2 Replies Latest reply on Mar 8, 2006 12:16 PM by Sandeep Pujar

    ActionRequest SetAttribute issues in 2.2.1 : RC2

    Sandeep Pujar Newbie


      I recently migrated to JBoss portal 2.2.1 RC2 from 2.0

      And I found this problem.

      When I set an attribute in my processAction request object it is not available in my doEdit request object.

      actionRequest.setAttribute("X", value)

      value = renderRequest.getAttribute("X")
      // --> value does not appear it is null

      This used to work in 2.0 if I am correct. Is this issue known ?
      and is it related to http://jira.jboss.com/jira/browse/JBPORTAL-606

      Any info on this would be really helpful.


        • 1. Re: ActionRequest SetAttribute issues in 2.2.1 : RC2
          l.forni Newbie


          jsr 168 (portlet specification) don't allow you to pass values from ActionRequest to RenderRequest using get/setAttibute.
          You have to use get/setParameter from PortletRequest (superclass of ActionRequest and RenderRequest)...

          but i found i problem with it (probably a bug in jbp 2.2.1RC2). Parameter should be associated only to the current Request (see portlet specification), instead parameters in jbp are stored and maintened over all next requests.

          So i used to put attribute in the portlet session (pay attenction to remove the attribute from the session if it isn't useful after read it)

          Hope this help

          Luca Forni

          • 2. Re: ActionRequest SetAttribute issues in 2.2.1 : RC2
            Sandeep Pujar Newbie


            I tried get/set parameter also but as you found, it did not work for me in 2.2.1 RC2.

            But the set/get attribute did work in the previous versions of JBP. I found this when I migrated my code to use 2.2.1 RC2 from 2.0, if I remember correct.

            So was curious to know if there was a bug in the new release.

            And on using the session set/get attribute I guess now that is the only way to pass parameters from processAction to render.

            Any word from the developer community ? Is what I see a expected
            behaviour ?

            Thanks again,