Foren

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

thumbnail
Vikas R Khengare, geändert vor 11 Jahren.

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

Junior Member Beiträge: 58 Beitrittsdatum: 01.08.08 Neueste Beiträge
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, geändert vor 11 Jahren.

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

Liferay Master Beiträge: 803 Beitrittsdatum: 10.03.08 Neueste Beiträge
Try to use server resource URL .
thumbnail
Mani kandan, geändert vor 11 Jahren.

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

Expert Beiträge: 492 Beitrittsdatum: 15.09.10 Neueste Beiträge
Its better you could use this link or this thread
thumbnail
Vikas R Khengare, geändert vor 11 Jahren.

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

Junior Member Beiträge: 58 Beitrittsdatum: 01.08.08 Neueste Beiträge
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, geändert vor 11 Jahren.

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

Liferay Master Beiträge: 803 Beitrittsdatum: 10.03.08 Neueste Beiträge
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, geändert vor 9 Jahren.

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

Junior Member Beiträge: 55 Beitrittsdatum: 07.10.14 Neueste Beiträge
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.