Loading DOJO 1.9 in Websphere Portal 8

Loading DOJO 1.9 in Websphere Portal 8
Two ways of loading dojo 1.9 into websphere portal 8 theme.
1st Method   Using Script tag
             Steps to follow
i.         Create web project
a.       File->New->Web Project
b.      Give Name of Project and select Dojo Toolkit Click Next
c.       Click on Change these setup options …
d.      Choose Copy Dojo into this Project. It will be deployed from there and click on next.
e.      Choose On Disk option and get Dojo Archive Files… Then Finish
f.        Click Finish
Folder Structure will look like this
                            
ii.       Deploy it in Server
iii.      In your custom theme.html After co:head
<link rel=“dynamic-content”href=“co:head”>
                 
<script type=”text/javascript” src=”/dojov1.9/dojo/dojo-release-1.9.3/dojo/dojo.js”></script>
iv.     Apply this theme to any one of your portal pages
v.       For testing purpose Open Browser console and run dojo.version  to check which version is loaded 



2nd Method     Using Modular Framework
           Steps to follow
 Create Web Project File->New->WebProject
i.         Give Name of Project and select Dojo Toolkit Click Next (My project name is dojov1.9)
ii.       Click on Change these setup options …
iii.      Choose Copy Dojo into this Project. It will be deployed from there and click on next.
iv.     Choose On Disk option and get Dojo Archive Files… Then Finish
v.       Click Finish
vi.     Deploy it in server
vii.    Create REP Variable in WP GlobalThemeConfig
a.       Name resources.js.dojo.v1.9.3         Value    /dojov1.9
viii.  Create plugin.xml
<?xml version=”1.0″ encoding=”UTF-8″?>
<?eclipse version=”3.0″?>
<plugin  id=“custom.dojov1.9” name=“Dojo plugins” version=“1.0.0”
 provider-name=“custom”>
      <extension point=“com.ibm.portal.resourceaggregator.module” id=“dojo_19_dojo_head” >
            <module id=“dojo_19”>
                  <contribution type=“head”>
                        <!– Load the layer itself –>
                        <sub-contribution type=“js”>
                              <uri value=“res:{rep=WP GlobalThemeConfig;key=resources.js.dojo.v1.9.3}/dojo/dojo-release-1.9.3/dojo/dojo.js” />
                              <uri type=“debug” value=“res:{rep=WP GlobalThemeConfig;key=resources.js.dojo.v1.9.3}/dojo/dojo-release-1.9.3/dojo/dojo.js.uncompressed.js” />
                        </sub-contribution>
                  </contribution>
            </module>
      </extension>
</plugin>
ix.     Export plugin.xml as jar into WEB-INF->lib
x.       Set profile_lightweight.json as default profile for your theme
xi.     Add Modules that you created in plugin.xml into moduleIDs array in profile_lightweight.json
xii.    Restart your server
xiii.  For testing apply this theme to any of your portal page and in web console type dojo.version

One comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Enable Notifications OK No thanks