Win a copy of Learning Java by Building Android Games this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

Searching in DataTable  RSS feed

 
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
 
Bartender
Posts: 19801
93
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
Bartender
Posts: 19801
93
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
Bartender
Posts: 19801
93
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
Boost this thread!