2 Replies Latest reply on May 31, 2005 3:16 PM by Martin Giljohann

    Problem with portlet parameters

    Martin Giljohann Newbie

      I am experiencing a bigger problem navigating through my portlet, and this problem seems to be quite similar to this post
      http://www.jboss.org/index.html?module=bb&op=viewtopic&t=63886

      This does not seem to be an issue only with my custom portlet, because it can be replicated e.g. taking JBP's RolePortlet. Here's what I did

      1) logged in as an admin, then on
      2) homepage /portal: clicked on ? admin? in the ?Page Menu? (helloworld, default, admin, ...)
      3) then on the overview page.default.admin clicked on ?Edit role members?
      4) I get to the page titled ?Edit role members?... did not do anything here but navigated with my browsers back button to /portal
      5) clicked on ?admin? just like in step 2
      6) Problem: I get the ?Edit role members? page from step 4, although I should see the overview page from step 3

      So actually I never get back to the overview page from step 3. I did some debugging and I don't get why org.jboss.portlet.JBossRenderRequest#getParameters() returns a Parameters Map with values from the previous request although the current request does not contain any parameters. I could imagine that this could lead to the behaviour I described.

      My system is fedora core 2, java 1.4.2_08, JBoss AS 4.0.2 and I got the portal sources from cvs head last Friday.

      Any ideas are highly appreciated.

      Martin

        • 1. Re: Problem with portlet parameters
          Roy Russo Master

           

          "martingi" wrote:
          1) logged in as an admin, then on
          2) homepage /portal: clicked on ? admin? in the ?Page Menu? (helloworld, default, admin, ...)
          3) then on the overview page.default.admin clicked on ?Edit role members?
          4) I get to the page titled ?Edit role members?... did not do anything here but navigated with my browsers back button to /portal
          5) clicked on ?admin? just like in step 2
          6) Problem: I get the ?Edit role members? page from step 4, although I should see the overview page from step 3


          This works as designed. The portal is a big state-engine, so the Roleportlet will show when you go to the admin page, as that is the portlet you left there. To view the admin page in its default setting, just click the Roleportlet NormalMode icon.

          • 2. Re: Problem with portlet parameters
            Martin Giljohann Newbie

             

            "roy.russo@jboss.com" wrote:
            To view the admin page in its default setting, just click the Roleportlet NormalMode icon.

            Ok my example of the RolePortlet was a bad one. But take the ForumsPortlet as another example which will require much more of my users to navigate through it. In my opinion I can't expect them simply not to use their browser's back-button and to click always on my portal links instead. Or at least this would require a lot of educational effort from my side ;-(

            From my understanding of the portlet spec, the behaviour I would expect in this case is addressed on p. 44.
            "If the request does not have any parameter, the getParameterMap must return an empty Map object."


            Back to previous post - I reckon that I would not get into what I regard as a problem for my application, if the Parameters map after step 4 would be really empty.

            Martin