• Post Reply Bookmark Topic Watch Topic
  • New Topic

Sort the JSF data table using Jquery 1.7  RSS feed

 
Muralidhar Veluru
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I'm using JSF1.2 and IBM websphere portal 7 (Core) not prime or rich faces. I would like to know to sort the JSF data table(<h:datatable /> using Jquery 1.7

Note: I'm successful in sorting in server side .

Thank you in advance.
 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think you can use jquery to do the sorting. You need to call some bean function to sort.

Have an example here
 
Muralidhar Veluru
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi :
I'm able to do sorting using java util Comparator in managed bean but I'm wondering is it possible to do using jquery or java script or client side scripts?
if yes, any example is highly appreciated

Thank you
Murali.
 
Tim Holloway
Bartender
Posts: 18715
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Technically you could use Javascript to sort the table client-side, but it would probably result in something really baroque and unreliable. The JSF and JavaScript mechanisms can work together - a lot of the extension tagsets use jQuery - but only if you really know what you are doing.

It's simpler to sort the DataModel that's backing the dataTable. You can do that with an AJAX request if you like.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!