1 2 Previous Next 17 Replies Latest reply on Apr 27, 2011 4:54 AM by trong.tran Go to original post
      • 15. Re: Get "GET" parameter for a portlet?
        vstorm83

        Good for you Steffen, but as I said, I still think this is not a standard way to get parameter in the portlet world

        • 16. Get "GET" parameter for a portlet?
          antoine_h

          Minh Hoang TO wrote:

           

          Let's put a break point in your method processAction to see if when you browse the page, the method is executed or not !

           

          did you tryied it ?

          it is a good clue, for investigation.

           

          As far as I can see in your code, you use the RenderResponse#createRenderURL() to build the Url to call your page/portlet.

          This kind of Url will trigger the portlet, but only the Render phase (and method doView() etc...).

           

          If you want the processAction() method to also be triggered, you shall build the Url with RenderResponse#createActionURL().

          With this kind of url, the Portlet first process the doAction() method, to change it's state, then will do it's render methods for rendering, in the render phase.

           

          It is in the Action phase that you do your cooking, and decide what parameters will be given to the Render phase. You can convert the values, add some computed parameters etc...

           

          Have a look at the Portlet JSR specification : it is interesting, and very well explained there, as many other portlet behavior things.

           

          So, globaly, your first code is ok, it is only the way to build the url to call it that do not make it works.

           

          ***********

           

          About Public Render Parameters (PRP), it is a way to have the parameter directly in the Render phase, even if the Action phase of this very portlet is not called.

          It is a good way to share information between portlets, but not very good if it is only to provide the parameter from a render url.

           

          For the use case that you describe, the ActionUrl is the best way.

          Your portlet remains as independent as possible of the other things of the portal (PortalRequest, public parameters, etc...).

           

          A bit late... hope it helps...

           

          Antoine

          JBoss Portal and GateIn (JSR-286), JSF, Richfaces, J2EE, Drools, BRMS.

          http://www.sysemo.com/Sysemo-expertise-portails-jboss-portal.php

          • 17. Get "GET" parameter for a portlet?
            trong.tran

            Antoine Herzog wrote:

             

            Minh Hoang TO wrote:

             

            Let's put a break point in your method processAction to see if when you browse the page, the method is executed or not !

             

            did you tryied it ?

            it is a good clue, for investigation.

            it will not trigger processAction in the case

            1 2 Previous Next