WebSphere Portal Server - JSR168 Custom Modes

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > February 2007 > JSR168 Custom Modes





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author JSR168 Custom Modes

2007-02-23, 7:17 pm

I cannot find any samples of JSR168 portlets that use custom modes other than config. I am trying to build a multi-mode portlet that will use custom modes but when I create modes view2 and view3 and then try to assign the custom mode to a PortletURL in t
he mainView.jsp I get an error.

...
PortletURL pRenderURL= renderResponse.createRenderURL();
PortletMode pmView2 = new PortletMode("view2");
pRenderURL.setPortletMode(pmView2);//<!!!!this line throws the error!!!!
String render_hrefView2 = pRenderURL.toString();
...

Why do I get the following runtime error?
javax.portlet.PortletModeException: Cannot set portlet mode view2 for Control (CustomModes, [ObjectIDImpl '7_CS9G40K2087IF021NFLAQS10G1' [- 496240293741844596:3458898264839358592@0
/ NAVIGATION_NODE], Domain: [Domain: rel], DB representation: 0000-8C274800
15001DF98008F755A5790030], [ObjectIDImpl '6_CS9G40K2087IF021NFLAQS10G0' [- 496240293741844596:1153055255625664640@0
/ CONTENT_NODE], Domain: [Domain: rel], DB representation: 0000-8C27480015001DF98008F755A5790010], 100

I have added the mode to the portlet.xml and based my changes to CustomModesPortlet.java on the entries that RAD7 created for the config custom mode.

I am guessing that I am missing a user permissioning step because I got the same error when I set the mode to config while logged in as a non-admin.

Any help would be great.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com