Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Issue when using loadingmask
Hi.
I was facing an issue due to permissions in a portlet. I trying to add to a form the loadingmask. I am able to do it for admin users but when the user is a guest, it fails:
It is like the plug function does not work for guest users because loadingmask is always undefined for them:
Could anyone help me with this? Any idea would be very appreciated.
Thanks in advance.
Kind regards.
I was facing an issue due to permissions in a portlet. I trying to add to a form the loadingmask. I am able to do it for admin users but when the user is a guest, it fails:
<script type="text/javascript" charset="utf-8">
function <portlet:namespace />showLoading() {
AUI().use( 'aui-loading-mask', function(A){
A.one('#<portlet:namespace />reportForm').plug(A.LoadingMask, { background: '#000' });
A.one('#<portlet:namespace />reportForm').loadingmask.toggle();
});
}
</script>
It is like the plug function does not work for guest users because loadingmask is always undefined for them:
Uncaught TypeError: Cannot read property 'toggle' of undefined
Could anyone help me with this? Any idea would be very appreciated.
Thanks in advance.
Kind regards.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™