GeeCON Prague 2014*
The moose likes Portals and Portlets and the fly likes custom-portlet-mode Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "custom-portlet-mode" Watch "custom-portlet-mode" New topic
Author

custom-portlet-mode

praveen kanakarajan
Ranch Hand

Joined: Apr 27, 2005
Posts: 54
Hi,
i tried to create a custom-portlet-mode portlet and tried to deploy it in Apache Pluto.but its showing error when i try to create a action URL specifying portletmode.saying its unsupported as follows.I have specifed the custom-portlet-mode in portlet.xml and also the overridden the doDispatch method.

Nested Exception is javax.portlet.PortletModeException: unsupported Portlet Mode used: save
at org.apache.pluto.core.impl.PortletURLImpl.setPortletMode(PortletURLImpl.java:96)
at org.apache.pluto.tags.ActionURLTag.doStartTag(ActionURLTag.java:64)
at org.apache.jsp.mediaview_jsp._jspx_meth_portlet_actionURL_1(org.apache.jsp.mediaview_jsp:173)
at org.apache.jsp.mediaview_jsp._jspService(org.apache.jsp.mediaview_jsp:116)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


it would be helpful if someone could tell me whether it is supported or not and if it supports,can antyone give me links or such where i can get sample code or tutorial for this.
Stefan Zoerner
Author
Ranch Hand

Joined: Nov 29, 2001
Posts: 121
It is not possible to define a new custom portlet mode by a portlet. Only a portal may introduce its own modes (like WebSphere Portal, which introduces the "config" mode).

Greetings, Stefan


Stefan Zoerner
Author of German LDAP-Book
Committer at Apache Directory Project
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

The portal itself must support any custom portlet modes you want to develop for your portlet. If you want your portlet to have a print mode, you can't just override the doDispatch method - your portal must explicitly support that portal mode. To find out which portlet modes your portal administrator had decided to support, you can always query the PortalContext.

From the WebSphere Portal Certification Guide (Test 399):

"The PortalContext has five methods, including getPortalInfo, getPropertyNames, getProperty, getSupportedPortletModes and getSupportedWindowStates. The object used to access the RequestDispatcher and the portal logging mechanism is the similarly named PortletContext object."

Cheers!

-Cameron McKenzie
[ October 28, 2006: Message edited by: Kameron McKenzie ]
 
GeeCON Prague 2014
 
subject: custom-portlet-mode