Foros de discusión

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

thumbnail
Vikas R Khengare, modificado hace 11 años.

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

Junior Member Mensajes: 58 Fecha de incorporación: 1/08/08 Mensajes recientes
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, modificado hace 11 años.

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

Liferay Master Mensajes: 803 Fecha de incorporación: 10/03/08 Mensajes recientes
Try to use server resource URL .
thumbnail
Mani kandan, modificado hace 11 años.

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

Expert Mensajes: 492 Fecha de incorporación: 15/09/10 Mensajes recientes
Its better you could use this link or this thread
thumbnail
Vikas R Khengare, modificado hace 11 años.

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

Junior Member Mensajes: 58 Fecha de incorporación: 1/08/08 Mensajes recientes
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, modificado hace 11 años.

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

Liferay Master Mensajes: 803 Fecha de incorporación: 10/03/08 Mensajes recientes
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, modificado hace 9 años.

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

Junior Member Mensajes: 55 Fecha de incorporación: 7/10/14 Mensajes recientes
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.