Win a copy of Svelte and Sapper in Action this week in the JavaScript 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Searching in DataTable

 
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: 22496
151
Android Eclipse IDE Tomcat Server Redhat Java 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
Posts: 22496
151
Android Eclipse IDE Tomcat Server Redhat Java 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
Posts: 22496
151
Android Eclipse IDE Tomcat Server Redhat Java 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.
 
I do some of my very best work in water. Like this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic