Technote (FAQ)
Question
When switching pages, customers may experience errors in the browser if they are attempting to use a custom modularized page builder 2 theme in WebSphere Portal 7.0.0.2.
Under these circumstances, customers might see the following error:
In Internet Explorer (IE) -
com.ibm.mm.enabler.iwidget.widget.IWidgetWrapperModelImpl IWidgetWrapper._handleEventInternal: widget: customizeShelfWidget, eventName: com.ibm.mashups.builder.pageSwitched, HandleEventException:
TypeError: 'this.shelf' is null or not an object
com.ibm.mm.enabler.iwidget.widget.IWidgetWrapperModelImpl
_handleEvent: widget:customizeShelfWidgeteventName:com.ibm.mashups.builder.pageSwitched
In Firefox (FF) -
com.ibm.mm.enabler.iwidget.widget.IWidgetWrapperModelImpl
IWidgetWrapper._handleEventInternal: widget: customizeShelfWidget,
eventName: com.ibm.mashups.builder.pageSwitched, HandleEventException:
TypeError: this.shelf is undefined
Cause
Javascript is not being initialized properly due to customizations made in the theme.
Answer
These errors can be ignored because they have no impact on the functionality of the theme or their portal solution. If customers wish to address this, they can make the following changes to their installation:
* It is generally easier to make these edits to the uncompressed version of the file, but the changes can also be made to the compressed version.
* Make a backup of the file listed below before you edit it.
* After making the changes below, if you modified the uncompressed version, it is recommended that you re-compress it.
* Once the changes are made, re-start portal and clear the browser cache.
<portalserver_root>/ui/wp.mashup.cc.deploy/installedApps/MashupCommonComponent.ear/mm.builder.v3001.war/widget-catalog/customizeShelf.js(.uncompressed.js)
Before:
onPageSwitched: function(iEvent){
// summary: close the shelf when the page is switched
var pageId = iEvent.payload;
this.shelf.clearSelectedTab();
if(this.shelf.displayState == "open") { this.shelf.toggleDisplay(); }
},
After:
onPageSwitched: function(iEvent){
// summary: close the shelf when the page is switched
var pageId = iEvent.payload;
if (this.shelf) {
this.shelf.clearSelectedTab();
if(this.shelf.displayState == "open") { this.shelf.toggleDisplay(); }
}
},
-- AND --
Before:
_refreshTabs: function(pageId, isMaximized){
// summary: refreshes the controllers from the context menu API and updates the UI
// pageId: the id of the page for which to refresh
// isMaximized?: true if a widget was just maximized
this.shelf.refreshTabs(this._getData(pageId, isMaximized));
},
After:
_refreshTabs: function(pageId, isMaximized){
// summary: refreshes the controllers from the context menu API and updates the UI
// pageId: the id of the page for which to refresh
// isMaximized?: true if a widget was just maximized
if (this.shelf) {
this.shelf.refreshTabs(this._getData(pageId, isMaximized));
}
},
PLEASE NOTE: These changes will be overwritten if any fix or fixpack is applied to the portal installation. In which case, the customer will need to re-instate these changes after installing the fix/fixpack.
Related information
Updating an existing theme to use the new features
Rate this page:
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.