In Liferay when we try to do portlet ajax call from view.jsp, we get the issues like permission required or not able to pass the values when trying to pass parameters in ajax call.
To resolve this issue we need to provide permissions. So for this we just need to write ajaxable tag true in liferay-portlet.xml as defined below:
<portlet>
<portlet-name>admin</portlet-name>
<icon>/icon.png</icon>
<ajaxable>true</ajaxable> //this line
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>/js/main.js</footer-portlet-javascript>
<css-class-wrapper>admin-portlet</css-class-wrapper>
<add-default-resource>true</add-default-resource>
</portlet>
Hope this will help you :)
0 Comment(s)