Forums de discussion

Can we send AJAX request to "configuration-action-class" ?

thumbnail
Vikas R Khengare, modifié il y a 11 années.

Can we send AJAX request to "configuration-action-class" ?

Junior Member Publications: 58 Date d'inscription: 01/08/08 Publications récentes
Hi,

I want to send AJAX request to "configuration-action-class" which is define in "liferay-portlet.xml".

Whenever I am doing some actions on Portlets configurations it is refreshing whole page; instead of that I want to send AJAX request and get the response.

Is it possible in Liferay?
thumbnail
Jignesh Vachhani, modifié il y a 11 années.

RE: Can we send AJAX request to "configuration-action-class" ?

Liferay Master Publications: 803 Date d'inscription: 10/03/08 Publications récentes
Try to use server resource URL .
thumbnail
Mani kandan, modifié il y a 11 années.

RE: Can we send AJAX request to "configuration-action-class" ?

Expert Publications: 492 Date d'inscription: 15/09/10 Publications récentes
Its better you could use this link or this thread
thumbnail
Vikas R Khengare, modifié il y a 11 années.

RE: Can we send AJAX request to "configuration-action-class" ?

Junior Member Publications: 58 Date d'inscription: 01/08/08 Publications récentes
Hi

Thanks for your replies.

We can use serverResource() method for AJAX calls.

But Can we get JSON response when I am sedning AJAX call to actionURL / renderURL?

When I am sending AJAX call to actionURL / renderURL, in response I am getting HTML contents instead of JSON. Is there any way?

Thanks
thumbnail
Jignesh Vachhani, modifié il y a 11 années.

RE: Can we send AJAX request to "configuration-action-class" ?

Liferay Master Publications: 803 Date d'inscription: 10/03/08 Publications récentes
You can convert it in JSON form by putting your method in *localserviceimpl and you can flush this response in any jsp and make ajax call using jquery or any other way you want .
Please see Here to convert List into JSON.
Also visit http://www.liferay.com/web/james.falkner/blog/-/blogs/9308485#hmhp_messageScroll9381563
thumbnail
Srikanth Shanigaram, modifié il y a 9 années.

RE: Can we send AJAX request to "configuration-action-class" ?

Junior Member Publications: 55 Date d'inscription: 07/10/14 Publications récentes
HI every one,
I am facing a problem with two action classes.
I want to call configuration-action class from portlet jsp but it is going to portlet action class. Is it possible to call configuration-action class from portlet jsp (not from configuration.jsp).

Thanks.