• 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
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

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
 
Saloon Keeper
Posts: 20657
122
Android Eclipse IDE Java Linux Redhat Tomcat Server
  • 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
Posts: 20657
122
Android Eclipse IDE Java Linux Redhat Tomcat Server
  • 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
Posts: 20657
122
Android Eclipse IDE Java Linux Redhat Tomcat Server
  • 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.
 
Yeast devil! Back to the oven that baked you! And take this tiny ad too:
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!