Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jsf Paging Problem

 
Denise Smith
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Using WSED 5.1.2
I'm using a HtmlWebPager to page through a recordList that is included on a page with a jsp:include. WSED creates a hidden input field to use for the links. The paging works great until I go of the page and do a new request. The link for the pages actually keeps the previous value. for example: If I'm paging through the 1st recordlist-page 1 to page 2 and back everything works. However if I go get a new recordlist the hidden input value remains the same as when I left it. So if in the old recordlist I was on page 4 the new recordlist location would be page 4. I want to reset the value back to 0 on a new recordlist but I don't know how to get to the generated hidden input code.

There is nothing in the backer bean that I can find to access the generated hidden input and the hx taglib is not helpful.

Can someone help?
 
Denise L Smith
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So...Here is the answer for all of you peoplelooking for this solution.
setFirst(0)....Call the setFirst(0) method on the get for what ever datatable you're putting your data in.

ie: getTbl(0).setFirst(0).

I actually ended up putting several(2) recordlist via jsp:include and one record on one page then i set a session variable to determine when a new search was being done and set the value on the onPageloadend of the backer bean for the search page. Then on one of the recordlists that I was including via jsp:include i checked to see if the session was true if it was I set setFirst(0) on each one of the recordlist getTbl() but I had to makeone of the recordlist getTbl() static so I could get it in the other backer bean. Then i changed the value of session to false.

Now each record list can be paged through separately...And all the pages are reset to 1 on new records.

I had a very difficult time finding a solution to this - some people couldn't duplicate the problem and many others had the same problem with no solution. This works for paging issues that have multiple recordlists coming from jsp:include pages.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!