Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Searching in DataTable

 
aanshu gupta
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have a datatable which contains thosands of records. User can see 25 records at a time and can move next, previous etc.

What i want now is that initially when the page loads the datatable is not shown. And when the user enters any information in a textbox and clicks search button then only those records matching the criteria should be shown. The page should noit refresh again and again.
Please help me. I am stuck at this.
thanks,
anshu gupta
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18098
50
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the sort of problem that AJAX was developed to handle.

RichFaces is one of several JSF extensions that can do what you're looking for. Basically, you'd set up a dataTable with a scroller attached to it to allow for paging. Use the RichFaces reRender attribute on the scroller to indicate that just the displayed table should refresh and not the entire page. Also use the "rendered=" attribute to hide the datatable until the query has been made.

These are powerful tools and they'll make what you want done fairly simple.
 
aanshu gupta
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.
But i am using Apache Myfaces and Trinidad.
So how to use paging in Apache.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18098
50
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MyFaces Tomahawk has a paging control.
 
aanshu gupta
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes..but have to implement it using trinidad only.
Cant use Tomahawk.
Thanks for your quick reply.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18098
50
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Trinidad is also part of MyFaces and the only technical issues in combining them will be listed in the official Apache documentation.

Political issues, on the other hand, are your own problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic