Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Gosia K
Liferay search container loaded by ajax
April 11, 2011 10:25 AM
Answer

Gosia K

Rank: New Member

Posts: 1

Join Date: November 6, 2008

Recent Posts

Hi,

I’m trying to load a liferay table (liferay-ui:search-container) using ajax. To do that I set windowState="EXCLUSIVE" and everything works perfect.
But then any link (portlet:renderURL) in that piece of code by default is invoked in exclusive mode too.
Because of that pagination is called in EXCLUSIVE mode and as a result I have a white page with only the content of my portlet.

Is there any way to have pagination using ajax or to remove exclusive mode for pagination.

Thanks!
Alex Curtui
RE: Liferay search container loaded by ajax
November 15, 2012 5:02 AM
Answer

Alex Curtui

Rank: Junior Member

Posts: 30

Join Date: November 8, 2012

Recent Posts

Hello, have you solved your problem?
If so, can you share some hints about how you loaded the search container by ajax?

Regards,
Alex C.
Vishal Panchal
RE: Liferay search container loaded by ajax
November 15, 2012 9:37 PM
Answer

Vishal Panchal

Rank: Expert

Posts: 277

Join Date: May 20, 2012

Recent Posts

Hi All,

According to me the Best way to achieve this is to use jqxGrid .

Thanks,
Vishal R. Panchal
Priyanka Dhingra
RE: Liferay search container loaded by ajax
November 15, 2012 9:47 PM
Answer

Priyanka Dhingra

Rank: Liferay Master

Posts: 501

Join Date: December 19, 2011

Recent Posts

Can you tell how you did the former part....
load a liferay table (liferay-ui:search-container) using ajax.
I have a requirement...but not getting how to do it
Murali Karteek
RE: Liferay search container loaded by ajax
February 14, 2013 8:38 PM
Answer

Murali Karteek

Rank: Junior Member

Posts: 37

Join Date: March 5, 2012

Recent Posts

Hi All,

Can you show me piece of code to achieve Liferay Search Container loaded using Ajax?

Thanks and Regards,
Karteek.
Murali Karteek
RE: Liferay search container loaded by ajax
May 20, 2013 5:22 AM
Answer

Murali Karteek

Rank: Junior Member

Posts: 37

Join Date: March 5, 2012

Recent Posts

Hi All,

Some one guide me to load the liferay search container table loaded by ajax?

Thanks & regards,
Karteek
Alex Curtui
RE: Liferay search container loaded by ajax
May 20, 2013 10:42 PM
Answer

Alex Curtui

Rank: Junior Member

Posts: 30

Join Date: November 8, 2012

Recent Posts

Hi,

I don't have time to detail the process right now, but here are some links that will help you:

Search Container with pagination withour refresh and Search Container on popup page.

Good luck,
Alex
Murali Karteek
RE: Liferay search container loaded by ajax
May 20, 2013 11:28 PM
Answer

Murali Karteek

Rank: Junior Member

Posts: 37

Join Date: March 5, 2012

Recent Posts

Hi Alex,

Thanks for your reply. I tried it earlier itself and it is working fine.
But my requirement is not only that along with that , when I select any option from select box according
to option search container table should be updated in the same page through Ajax Control.
And also Search Container with pagination without refresh.

Both the things should be work for me.



Thanks & regards,
Karteek.
Alex Curtui
RE: Liferay search container loaded by ajax
May 20, 2013 11:59 PM
Answer

Alex Curtui

Rank: Junior Member

Posts: 30

Join Date: November 8, 2012

Recent Posts

Hi Karteek,

Unlike links (a hrefs), the dropdown has a javascript action attached to it. You must remove it, and attach yours, which does the same thing as for hrefs:

 1<!-- you need to define an url to which the call is made -->
 2<portlet:resourceURL var="ajaxSearchUrl"/>
 3
 4//this applies for all select's on page, you should modify it to get only the desired ones
 5//remove default javascript action
 6A.all("select").set("onchange", "");
 7
 8//refresh the page on "change" event
 9A.all("select").on("change", function(dropdown){
10    var uri = "${ ajaxSearchUrl }";
11    uri += //and here it depends what have you selected
12    // if change page: uri += "&cur=" + selectedValue <- taken from dropdown parameter
13    // else, change delta param
14
15    parent.io.set('uri', uri);
16    parent.io.start();
17});


Regards,
Alex
Murali Karteek
RE: Liferay search container loaded by ajax
May 21, 2013 3:09 AM
Answer

Murali Karteek

Rank: Junior Member

Posts: 37

Join Date: March 5, 2012

Recent Posts

Thank You Alex,

Your Reply helped me a lot in completing the task.
Prathibha h m
RE: Liferay search container loaded by ajax
June 2, 2014 2:58 AM
Answer

Prathibha h m

Rank: Junior Member

Posts: 63

Join Date: September 17, 2009

Recent Posts

Hi Murali,

Can you let me know how were able to achieve this. Can you please share your code block.

it will be a great help.

Regards,
Prathibha