AJAX in Liferay

Jamie Sammons modifierades för 3 År sedan. New Member Inlägg: 2 Anslutningsdatum: 2022-09-15 Senaste inlägg

I have an interesting problem. I am trying to get some options to be displayed in a dropdown ellipses menu within our dashboard that is built using AG-Grid JavaScript Data Grid controls. To get these options displayed I have to access some logic written in Java in the Backend code.

 

How can I use Ajax (or any other method), to do this within Liferay (Community Edition)

thumbnail
Jamie Sammons modifierades för 5 Månader sedan. Junior Member Inlägg: 59 Anslutningsdatum: 2016-03-25 Senaste inlägg

Yes, you can use Ajax with Jquery, AUI or javascipt fetch.

And in backside create a resource command.

To make a resource url, you can do this:

<portlet:resourceURL var="resourceVaraible" id="resourceId"/>

Here an explaination :

https://help.liferay.com/hc/en-us/articles/360017885812-MVC-Resource-Command