0 Replies Latest reply on May 3, 2010 5:36 PM by Mauro Lopez

    Public render parameters not always available in render phase

    Mauro Lopez Newbie



      The following portlet example shows the value of the "renderParameter" PRP (public render parameter), and if the submit button is pressed, sets it to the value "Hello":



      public class MyPortlet extends GenericPortlet {

          private static final String RENDER_PARAMETER = "renderParameter";

          protected void doView(RenderRequest request, RenderResponse response)

                  throws PortletException, IOException {
              String actionURL = response.createActionURL().toString();
              PrintWriter out = response.getWriter();
              out.print("render parameter value is: " + request.getParameter(RENDER_PARAMETER));
              out.print("<form method=POST action=" + actionURL + "><input type=submit value=Subir></form>");

          public void processAction(ActionRequest request, ActionResponse response)

                 throws PortletException, IOException {
              response.setRenderParameter(RENDER_PARAMETER, "Hello");




          <qname xmlns:x="http://www.happyportlet.com/public-render-parameters">x:renderParameter</qname>



      After the button is pressed, the PRP is set, and (at least) the following actions will NOT UNSET it:

      1. maximizing/restoring the portlet window
      2. playing with other portlets (of course, the other portlets do not use this particular PRP)
      3. Navigate to other pages, and then return (e.g. clicking pages in the navigation bar)


      This is, I think, the expected behaviour, since any PRP (as any other render parameter) should be available, once set, after any subsequent render phase.


      Well, this was the situation with jboss portal 2.7.0, but in portal 2.7.2, when you play around with the pages in the navigation bar, the PRP is lost.


      Is this a bug? Do you know how to get 2.7.2 behave like 2.7.0?