Monday 11 May 2015

How to resolve permissions issue in Portlet ajax request

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:

copytext

     <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 :)
You can see such more blogs at http://findnerd.com/NerdDigest/

No comments:

Post a Comment