• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

custom-portlet-mode

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Author
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
reply
    Bookmark Topic Watch Topic
  • New Topic