• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Problem w/Data Table model

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am using an HTMLDataTable as the model for my h:datatable on the frontend. I have implemented a selectManyListBox search functionality where as soon as the user clicks an item in any of the lists, the form is submitted, and only those rows which fit the selected criteria are shown. This is effectively a filter search.

The problem comes in when I have a datatable w/say 50 elements, and the size of my datatable is 20 elements. So when you click the ">" button, it goes to the last page.

Now I add a criteria selection, and now the amount of elements in the datatable is 18. Now there it can all fit in one page, but the datatable model needs to be set back to the first page. I am not sure how to do this... should I clarify?

Thanks,
Ayan
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Set the property of h:datatable

first="#{LoginManager.offset}"

Here LoginManager is my BackingBean and offset is integer variable with zero value.

I think this will solve the problem.
 
The only cure for that is hours of television radiation. And this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic