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?
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.
Is partial refresh feature working?
I am still facing problem. :-(
ruchika, it is working.
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.
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.
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.