Forums de discussion

Autocomplete JQuery

Melvin Rodriguez Rojas, modifié il y a 13 années.

Autocomplete JQuery

Junior Member Publications: 50 Date d'inscription: 04/02/11 Publications récentes
I'm using the autocomplete search Jquery in Liferay 6.. and this works fine.!!

Now how I can get the search inserted, and call a new portlet with information related to the search inserted.

Thanks!
thumbnail
Tanweer Ahmed ., modifié il y a 1 année.

RE: Autocomplete JQuery

Expert Publications: 322 Date d'inscription: 11/03/10 Publications récentes
Melvin,
You have to use InterPortlet Communication here.
First create the PortletSession object this
PortletSession portletSession = renderRequest.getPortletSession();


You can use (setting the attribute)
portletSession.setAttribute("NAME",VALUE,PortletSession.APPLICATION_SCOPE);
in the portlet where you are getting your autocomplete data.

In the other portlet where you want the value, use the code (getting the attribute)
portletSession.getAttribute("NAME",PortletSession.APPLICATION_SCOPE);

Hope this helps.
Melvin Rodriguez Rojas, modifié il y a 13 années.

RE: Autocomplete JQuery

Junior Member Publications: 50 Date d'inscription: 04/02/11 Publications récentes
But.. my variable VALUE is on Javascript???
How i can sent it? to the PortletSession object?


Thanks!
thumbnail
Tanweer Ahmed ., modifié il y a 1 année.

RE: Autocomplete JQuery

Expert Publications: 322 Date d'inscription: 11/03/10 Publications récentes
Hi Melvin,

Submit your form to the Porlet class using the dynamic url and passing the javascript values you have.You can get these values in your processAction or render of your Portlet from the javascript.In the Portlet class, you can use the above code.
Hope this helps.