7 Replies Latest reply on May 27, 2008 8:03 AM by pmn92

    Jboss Portal - Partial Refresh

    Adriano Ferranti Newbie

      Does anybody have already used the "partial refresh" in JBoss Portal? I've followed the steps as described in reference guide, but the portal still performing a full refresh instead of just refreshing the changed portlet. Perhaps I'm missing some step.
      If someone has some link for an example application using this feature or something like that, it would be nice !


      Thanks

        • 1. Re: Jboss Portal - Partial Refresh
          Andrew Glover Newbie

          Hi,

          I have the same problem. I have set the property theme.dyna.partial_refresh_enabled to true and have 3 portlets on the page.

          If I submit a form to a render or action url from Portlet A, the doView method is also called on Portlet B and Portlet C.

          I have tried it on 2.6.4 and 2.6.5 sp1 with the same results.

          Can anyone help here please?

          Thanks,
          Andrew

          • 2. Re: Jboss Portal - Partial Refresh
            Pavel Myshkin Newbie

            Partial refresh (PR) works only if you enable it on the page.
            You can enable it from the Admin portal or by deploying a deployment with the PR property set to true.

            If enabled it will work on user interaction through links generated from the RenderResponse with the methods createRenderURL (for use with A tag ) and createActionURL (for FORM's action ).

            If you use JSF then your form's action is auto generated by the framework and this means that commandLink and commandButton will cause a full page refresh.

            • 3. Re: Jboss Portal - Partial Refresh
              ruchika garg Newbie

              Is partial refresh feature working?
              I am still facing problem. :-(

              • 4. Re: Jboss Portal - Partial Refresh
                Pavel Myshkin Newbie

                ruchika, it is working.

                • 5. Re: Jboss Portal - Partial Refresh
                  ruchika garg Newbie

                  I tried but it is not working for me.
                  Can you please elaborate the steps?
                  I am not sure what I am missing.

                  It would be a great help.

                  Regards,
                  Ruchika

                  • 6. Re: Jboss Portal - Partial Refresh
                    Pavel Myshkin Newbie

                    1. To enable partial refresh for a page you must add the following property to the page / portal properties (properties are inherited by children).

                    <property>
                     <name>theme.dyna.partial_refresh_enabled</name>
                     <value>true</value>
                    </property>
                    



                    2. make a simple portlet with two or three modes. (VIEW, EDIT, HELP).

                    3. make your View mode display hyperlinks to Edit and Help modes, and Edit mode display links to Help and View (and so on...), by using the following examples :


                    RenderResponse rres = (RenderResponse) response;
                    PortletURL ru = rres.createRenderURL();
                    ru.setPortletMode(PortletMode.EDIT);
                    String url_edit = ru.toString();
                    
                    ru.setPortletMode(PortletMode.HELP);
                    String url_help = ru.toString();
                    


                    these Strings go into the HREF attribute of the A tag in your output like this link:
                    TO PARTIALLY REFRESHED EDIT MODE

                    of course you may want to adjust this knowledge to your environment, maybe a JSF portlet.

                    After clicking the link on the page you can see that the modes are interchangeable without page refresh.


                    • 7. Re: Jboss Portal - Partial Refresh
                      pmn92 Novice

                      partial refresh works in the sense that the page on the client side is partially refreshed but I would not be surprised if the doView() methods are still called on the server side.

                      It seems that JSR 286 provides better interaction between client and server. Partial refresh works only for inependent portlets, it's more decorative than useful.