I need to refresh asset publisher portlet every 5 minutes..
Liferay 6.2 ce ga2
thank you
I need to refresh asset publisher portlet every 5 minutes..
Liferay 6.2 ce ga2
thank you
Using setInterval
javascript method and Liferay.Portlet.refresh("#p_p_id<portlet:namespace/>")
, you can achieve that.
For Example:
function refreshPortlet(){
Liferay.Portlet.refresh("#p_p_id_19_");
setInterval(refreshPortlet, 10000);
}
refreshPortlet();
Above code will refresh Message board portlet every 10 seconds.
In case of asset publisher, portlet namespace would be something like 101_INSTANCE_bsWWbeve8ffA_
You can place your code in jsp of asset-publisher-portlet by overriding it with hook.
This is the solution I followed :
Step 2 : Insert the following script in Javascript" in the right side:
function refreshPortlet(){
Liferay.Portlet.refresh('.portlet-asset-publisher');
setInterval(refreshPortlet, 300000);
}
refreshPortlet();
I hope this helps