Reputation: 2017
I try to create a link refreshing a liferay portlet, but this doesn't work:
<a href="javascript:Liferay.Portlet.refresh('#p_p_id_portletname')">link</a>
What is wrong?
Upvotes: 2
Views: 5286
Reputation: 4210
You have to add extra _ (underscore) at the end.
e.g.
Liferay.Portlet.refresh("#p_p_id_customCharts_WAR_CustomCharts_INSTANCE_6QxU_")
Also, Its good practice to use onclick attribute instead of href for calling javascript.
Upvotes: 3