Use and migrating Dojo versions with WebSphere Portal themes
Several of the existing and new themes in WebShere Portal v6.1.5 rely on the Dojo Toolkit to support fundamental operations within the theme. The default installation of WebSphere Portal V 6.1.5 includes Dojo Version 1.3.2. All themes provided by WebSphere Portal V 6.1.5 reference that new Dojo 1.3.2 version by default.
For backward compatibility, the Dojo V 1.1.1 Toolkit that was provided with earlier portal versions is also still installed.
The two Dojo versions are available in the portal in the following formats:
- The new Version 1.3.2 of Dojo is provided in its own EAR file. Its Web path is /portal_dojo .
- The previously used Version 1.1.1 of Dojo is unchanged from portal V 6.1. Its Web path is /wps/themes/dojo/portal_dojo .
With this choice of Dojo versions, you have the following options:
Portal V 6.1.5 themes: To use the themes provided with portal v6.1.5:Your own custom themes: If you have existing custom themes that you migrated from previous portal version and that rely on the old Dojo toolkit V 1.1.1:
- The portal V 6.1.5 themes to use Dojo V 1.3.2, no action is required.
- To revert any of the portal V 6.1.5 themes to use Dojo V 1.1.1 as in previous versions of the portal, follow the procedure given below for each theme that you want to change to Dojo V 1.1.1.
Note: For details about how to edit theme JSP fragments refer to the notes in the file Default.jsp .New themes: If you develop new themes, you can user either of the two Dojo versions. Determine the Dojo version for the theme by referencing the appropriate Web path in theme jsps.
- For custom themes that you want to keep at Dojo Version 1.1.1, no action is required.
- For custom themes that you want to convert to use the new Dojo version, modify the theme to locate Dojo by using the new Web path /portal_dojo. Replace all full Web path occurrences of /wps/themes/dojo/portal_dojo by the new Web path /portal_dojo. Also replace all Web application relative Web paths of themes/dojo/portal_dojo that might also be referenced by the same new Web path /portal_dojo.
Reverting portal V 6.1.5 themes to Dojo V 1.1.1:
To use themes provided with portal v6.1.5, but you want to revert them to use Dojo 1.1.1 as in previous versions of the portal, perform the following steps for each theme that you want to change to Dojo V 1.1.1.
Note: For details about how to edit theme JSP fragments refer to the notes in the file Default.jsp .
Modifications required to both the Portal and the PortalWeb2 themes:
1. Modify the file wps_war_installed_root/themes/html/theme/banner_searchControl.jspf .
Comment the following section out by changing it from this:
dojo.registerModulePath("ibm","/portal_dojo/ibm");
dojo.registerModulePath("com","/portal_dojo/com");
dojo.registerModulePath("dojo","/portal_dojo/dojo");
dojo.registerModulePath("dijit","/portal_dojo/dijit");
dojo.registerModulePath("dojox","/portal_dojo/dojox");
to this:
<%--<
dojo.registerModulePath("ibm","/portal_dojo/ibm");
dojo.registerModulePath("com","/portal_dojo/com");
dojo.registerModulePath("dojo","/portal_dojo/dojo");
dojo.registerModulePath("dijit","/portal_dojo/dijit");
dojo.registerModulePath("dojox","/portal_dojo/dojox");
-->
2. Make the following modifications to the file wps_ear_installed_root/themes/html/theme/head_djConfig.jspf .
2a. To determine the Dojo 111 base URL, add the code set in bold in the following to the top of the file:
<script type="text/javascript">
<%
//scope all local variables so they disappear after this block is closed.
{
%>
<portal-logic:urlFindInTheme file="./dojo/portal_dojo/dojo/dojo.js" id="dojoJS" forceAbsolute="true"/>
<%
//Dojo determines it's base url automatically by scanning for it's <script> tag in the document.
//Since we are including dojo inline in js.jsp, we have to tell Dojo it's base url
//because it cannot automatically determine it.
String dojoBaseUrl = dojoJS.toString();
int index = dojoBaseUrl.lastIndexOf( "/" ) ;
dojoBaseUrl = dojoBaseUrl.substring( 0, index + 1 );
%>
2b. Modify the existing line from:var djConfig = {parseOnLoad: false,
locale: '<%=userLocale%>'.replace(/_/, '-').replace(/iw/, 'he').toLowerCase(),
baseUrl: "/portal_dojo/dojo/"}; //fix locale compatibility issues in Dojo
to:var djConfig = {parseOnLoad: false,
locale: '<%=userLocale%>'.replace(/_/, '-').replace(/iw/, 'he').toLowerCase(),
baseUrl: "<%=dojoBaseUrl%>"}; //fix locale compatibility issues in Dojo
2c. Add sections as set in bold in the following to the bottom of the file:
<%
}
%>
</script>
3. Make the following modifications to the file the file wps_ear_installed_root/themes/html/theme/head_links.jspf :
3a. Change the existing lines from:
<link rel="stylesheet" type="text/css" href="/portal_dojo/dijit/themes/tundra/tundra.css" />
to:<link rel="stylesheet" type="text/css"
href='<portal-logic:urlFindInTheme file="./dojo/portal_dojo/dijit/themes/tundra/tundra.css"/>' />
3b. Change the existing lines from:<link rel="stylesheet" type="text/css" href="/portal_dojo/dijit/themes/tundra/tundra_rtl.css" />
to:<link rel="stylesheet" type="text/css"
href='<portal-logic:urlFindInTheme file="./dojo/portal_dojo/dijit/themes/tundra/tundra_rtl.css"/>' />
Modifications required to the Portal theme only:
Make the following modifications to the file the file wps_ear_installed_root/themes/html/Portal/js.jsp :
1. Change the existing line from:
<c:import url="/dojo/dojo.js" context="/portal_dojo" />
to:
<c:import url="../../dojo/portal_dojo/dojo/dojo.js" />
2. Change the existing line from:
<c:import url="/dijit/dijit.js" context="/portal_dojo" />
to:
<c:import url="../../dojo/portal_dojo/dijit/dijit.js" />
3. Change the existing line from:
<c:import url="/ibm/ibmClientModel.js" context="/portal_dojo" />
to:
<c:import url="../../dojo/portal_dojo/ibm/ibmClientModel.js" />
Modifications required to the PortalWeb2 theme only:
Make the following modifications to the file the file wps_ear_installed_root/themes/html/PortalWeb2/head_extras.jspf :
1. Change the existing line from:
<script type="text/javascript" src="/portal_dojo/dojo/dojo.js"></script>
to:
<script type="text/javascript"
src='<portal-logic:urlFindInTheme file="./dojo/portal_dojo/dojo/dojo.js"/>'></script>
2. Change the existing line from:
<script type="text/javascript" src="/portal_dojo/ibm/ibmClientModel.js"></script>
to:
<script type="text/javascript"
src='<portal-logic:urlFindInTheme file="./dojo/portal_dojo/ibm/ibmClientModel.js"/>'></script>
3. Change the existing line from:
<script type="text/javascript" src="/portal_dojo/com/ibmCSA.js"></script>
to:
<script type="text/javascript"
src='<portal-logic:urlFindInTheme file="./dojo/portal_dojo/com/ibmCSA.js"/>'></script>
Version 19 January 15, 2010 1:54:09 PM
This version (19)