0

I need to refresh asset publisher portlet every 5 minutes..

Liferay 6.2 ce ga2

thank you

SoukaProgrammer
  • 94
  • 2
  • 11

2 Answers2

1

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.

Pankaj Kathiriya
  • 4,210
  • 2
  • 19
  • 26
-1

This is the solution I followed :

  • Step 1 : Go to "Admin" > "site administration" > "Private pages"
  • 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

SoukaProgrammer
  • 94
  • 2
  • 11