Refreshing the portlet through the javascript


Some times it may require our portlet when some action performed.

We can refresh liferay portlet through the javascript.


<script type="text/javascript">
jQuery(document).ready(function() {

          Liferay.Portlet.refresh('#p_p_id_testjson_WAR_testjson_');
}
</script>

Bold word is the portlet name

Comments

  1. hi,im working in the portlets...here more than 500 portlet pages in web application ...here two kind of validation happening for exceptions (one is jsp exception and another one is portlet exception)here exceptions are raised but the problem is if i clear the portlet exception it will not clear the exception msg box because i wait for clearing the jsp exception also so ..i want to refresh both the pages at the time of im making event in jsp page..(when im clicking submit button after key in....) simply i want to refresh the boththe page jsp and portlet with single click event...

    ReplyDelete
  2. jsp ,editor eclipse ,java,portlet

    ReplyDelete
  3. In Liferay7 , we are getting "This change will only be shown after you refresh the current page." on execute Liferay.refresh.

    ReplyDelete

Post a Comment

Popular posts from this blog

Theme display in javascript

How to know which liferay version we are using

Viewing the SQL Query in liferay : debugging the SQL Query in Hibernate