1 Reply Latest reply on Jan 17, 2006 7:41 AM by mvoopentext

    ActionRequest.getPortletMode() throws NullPointerException

    mvoopentext

      Hello there

      Problem:
      My (generic) portlet reads the PortletMode whenever an action request /processAction(ActionRequest request, ActionResponse response) is computed.
      Sadly the code, which worked in Version 2.0 does not work here anymore because request.getPortletMode() throws a NullPointerException, debugging showed that an internal variable named (guess what) "mode" is null. Appearantly the org.jboss.portal.server.app.impl.AbstractInputContext gets instanciated with null.

      This does NOT happen in Render Requests / render(RenderRequest renderrequest, RenderResponse renderresponse)

      Versions:
      I am using the current jboss/tomcat integration:
      *JBoss Portal 2.2 + JBoss AS 4.0.3SP1
      *version 2.2
      *83.8 MB
      *Released 2005-12-15
      jboss has been used out of the box, no modifications, just copied my war into the deploy dir.

      OS is windows xp
      java is 1.5.06 (sun)

      background:
      We use a generic portlet that implements javax.portlet.Portlet. The portlet uses a workflow engine and is configured via the portlet parameters.
      RenderRequests get computed just fine, getPortletMode() works as expected.
      I used the web management tool to create an instance of my portlet, added it to the Test page and tried to use it.