Foren

Refresh portlet after process action method

thumbnail
Anil T, geändert vor 8 Jahren.

Refresh portlet after process action method

Expert Beiträge: 313 Beitrittsdatum: 14.01.12 Neueste Beiträge
Hi Team,

I have to reload the same portlet when its process action is executed. For example if we have three portlets on our page and we do any form submission on one portlet it should execute process action and reload same portlet without reloading the page.

One of the approach to this solution is using ajax functionality to call serveResource method and reload the page. But need to do same with processAction.

Anyone has any suggestions?

Thanks,
Anil T
Shiva Krishna Goud, geändert vor 8 Jahren.

RE: Refresh portlet after process action method

Regular Member Beiträge: 110 Beitrittsdatum: 02.01.15 Neueste Beiträge
you can also use Jquery ,.load functionality to render a jsp on specific div on success callback of submission


ex:<portlet:renderURL var="testURL" windowState="exclusive">
<portlet:param name="jspPage" value="jsppath"></portlet:param>
</portlet:renderURL>

$('#loadjsp').load('<%=testURL%>',formvalues);
thumbnail
Julien Mourad, geändert vor 8 Jahren.

RE: Refresh portlet after process action method

Junior Member Beiträge: 78 Beitrittsdatum: 22.01.15 Neueste Beiträge
You can simply use Liferay's JS Object: Liferay.Portlet.refresh( portletId )
thumbnail
Anil T, geändert vor 8 Jahren.

RE: Refresh portlet after process action method

Expert Beiträge: 313 Beitrittsdatum: 14.01.12 Neueste Beiträge
My requirement is different. It is not only the process to refresh the portlet but after executing process action it comes to render method. Here total page is loading. Here I want to reload only that portlet.