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: 280

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
Puneet Malode
RE: Liferay search container loaded by ajax
August 12, 2015 10:27 PM
Answer

Puneet Malode

Rank: New Member

Posts: 17

Join Date: July 20, 2012

Recent Posts

Hi Prathibha,
I may be replying to old post, but it may help someone.
I have created POC for loading the Search Container using Ajax. Please look into the attached portlet for complete code.
Attachments: ResourceServering-portlet.7z (115.1k)
Ravi Darji
RE: Liferay search container loaded by ajax
December 3, 2015 9:22 PM
Answer

Ravi Darji

Rank: Junior Member

Posts: 27

Join Date: May 14, 2014

Recent Posts

Puneet Malode:
Hi Prathibha,
I may be replying to old post, but it may help someone.
I have created POC for loading the Search Container using Ajax. Please look into the attached portlet for complete code.

Hi Puneet,

can you give me download Link?

Thanks & Regards,
Ravi Darji
Puneet Malode
RE: Liferay search container loaded by ajax
December 7, 2015 6:51 AM
Answer

Puneet Malode

Rank: New Member

Posts: 17

Join Date: July 20, 2012

Recent Posts

Hi Ravi,
The entire working portlet is attached to my previous reply. You can download the portlet from there.
kartik shiroya
RE: Liferay search container loaded by ajax
January 11, 2016 10:58 PM
Answer

kartik shiroya

Rank: Junior Member

Posts: 34

Join Date: December 28, 2014

Recent Posts

Murali Karteek:
Thank You Alex,

Your Reply helped me a lot in completing the task.



Hello Murali Karteek

Can u share your code block how u done this task.

Regards,
Kartik
Shiva goud
RE: Liferay search container loaded by ajax
January 11, 2016 11:32 PM
Answer

Shiva goud

Rank: Junior Member

Posts: 99

Join Date: January 1, 2015

Recent Posts

kartik shiroya:
Murali Karteek:
Thank You Alex,

Your Reply helped me a lot in completing the task.



Hello Murali Karteek

Can u share your code block how u done this task.

Regards,
Kartik



you can get Punnet POC form this URL
https://www.liferay.com/community/forums?p_auth=GDxR0Edp&p_p_id=19&p_p_lifecycle=1&p_p_state=exclusive&p_p_mode=view&p_p_col_id=column-1&p_p_col_pos=1&p_p_col_count=2&_19_struts_action=%2Fmessage_boards%2Fget_message_attachment&_19_messageId=57413273&_19_attachment=ResourceServering-portlet.7z