Fórum

Filtering in searchcontainer

thumbnail
Manish Kumar, modificado 11 Anos atrás.

Filtering in searchcontainer

Junior Member Postagens: 93 Data de Entrada: 02/03/12 Postagens Recentes
Hello Everyone,
I want to add drop down filtering in my search container, Can any one help me in that?
Thanks in advance.
Manish Kumar
thumbnail
Manish Kumar, modificado 11 Anos atrás.

RE: Filtering in searchcontainer

Junior Member Postagens: 93 Data de Entrada: 02/03/12 Postagens Recentes
I want to add feature for that i am attaching my screenshot. Please help me.
thumbnail
Amit Doshi, modificado 11 Anos atrás.

RE: Filtering in searchcontainer

Liferay Master Postagens: 550 Data de Entrada: 29/12/10 Postagens Recentes
Manish Kumar:
I want to add feature for that i am attaching my screenshot. Please help me.


Suppose if you are using search container of liferay then you need to refresh the page.

If page refresh is Ok for you then you can do simple thing, pass that parameter in controller and use the Dynamic Query or your service classes method depending on the data you required.

And render the Search container as you required.

For more knowledge on the Search container in liferay.

Refer this link.

And one more thing, if you need to apply filter without page refresh then my suggestion is to use Jquery and also pagination of jquery.

Thanks & Regards,
Amit Doshi
thumbnail
Manish Kumar, modificado 11 Anos atrás.

RE: Filtering in searchcontainer

Junior Member Postagens: 93 Data de Entrada: 02/03/12 Postagens Recentes
Thank you Amit,
I did not understood completely what you were suggesting. I hope you were indicating for the drop down in my attached snap shot.
Can you please give me some more brief about this.
Thanks,
Manish Kumar
thumbnail
Amit Doshi, modificado 11 Anos atrás.

RE: Filtering in searchcontainer

Liferay Master Postagens: 550 Data de Entrada: 29/12/10 Postagens Recentes
Manish Kumar:
Thank you Amit,
I did not understood completely what you were suggesting. I hope you were indicating for the drop down in my attached snap shot.
Can you please give me some more brief about this.
Thanks,
Manish Kumar


You need to pass that parameter of the filter in the method, and depending on the parameter of the filter try to get the data from your custom service or using dynamic query to get the same.

Hope you got it.

Thanks & Regards,
Amit Doshi
thumbnail
Rewati Raman, modificado 11 Anos atrás.

RE: Filtering in searchcontainer

Junior Member Postagens: 97 Data de Entrada: 24/02/12 Postagens Recentes
Hi Amit,

it would be very helpful if you provide some sample example how to achieve jquery with seach container.
As I am looking forward to do this with Jquery but not getting proper way

Thanks & Regards,
Rewati Raman
thumbnail
Amit Doshi, modificado 11 Anos atrás.

RE: Filtering in searchcontainer

Liferay Master Postagens: 550 Data de Entrada: 29/12/10 Postagens Recentes
Rewati Raman:
Hi Amit,

it would be very helpful if you provide some sample example how to achieve jquery with seach container.
As I am looking forward to do this with Jquery but not getting proper way

Thanks & Regards,
Rewati Raman



I think you get me wrong here. I am trying to say that If you want implement filters with the help of Ajax(or without page refresh) then try to use jquery because search container required page refresh.

Both combine jquery and search container together. Both are entirely different approach.

Thanks & Regards,
Amit Doshi
thumbnail
Jitendra Rajput, modificado 11 Anos atrás.

RE: Filtering in searchcontainer

Liferay Master Postagens: 875 Data de Entrada: 07/01/11 Postagens Recentes
If i am not wrong then Amit is trying to say is ..

-Submit form on onChange event of dropdown . Read this dropdown parameter at the control side.
-Fetch result from database using dynamic query/Finder method
-Pass result to view part.
thumbnail
Amit Doshi, modificado 11 Anos atrás.

RE: Filtering in searchcontainer

Liferay Master Postagens: 550 Data de Entrada: 29/12/10 Postagens Recentes
Jitendra Rajput:
If i am not wrong then Amit is trying to say is ..

-Submit form on onChange event of dropdown . Read this dropdown parameter at the control side.
-Fetch result from database using dynamic query/Finder method
-Pass result to view part.


Thanks Jitendra for making it more clear on my scenario.
thumbnail
Manish Kumar, modificado 11 Anos atrás.

RE: Filtering in searchcontainer

Junior Member Postagens: 93 Data de Entrada: 02/03/12 Postagens Recentes
Thank you so much Amit and Jitendra.
This is very clear now. Now i am very confident that it will work.
I will try it now.

Thanks,
Manish Kumar
thumbnail
Manish Kumar, modificado 11 Anos atrás.

RE: Filtering in searchcontainer

Junior Member Postagens: 93 Data de Entrada: 02/03/12 Postagens Recentes
As per my requirement it should come below the header and above the table. I am not able to get the drop down there.
Please help in that.
Thanks,
Manish Kumar.