Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem w/Data Table model  RSS feed

 
Ayan Afridi
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • 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
 
Varun Monga
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!