Control Page Number in Display Table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KusoYumi
    New Member
    • Mar 2008
    • 11

    Control Page Number in Display Table

    Hi everyone,

    I have met a problem here regarding the display table. Let me explain my problem 1st.
    Assume that I want to display a list of data in a table, each page contains 10 records. So when I clicked on page no.2, it will showing records from 11 to 20. At this moment, I have click submit button to save the changes I did in page 2. So now my question is, after saved, it should be remain the page 2, but now it show "[First/Prev]1, 2, 3, 4 [Next/Last]" page 1 is highlighted. I had check the log, and it shown that set to page 2, and I tried to <c:out> the value, it show 2, but I cant figure out why it happened?
    And i found that when i clicked on the numbered pages list, parameter "d-xxxxxxx-p=4"(just an example) will be appended in the url, so does it mean I couldn't do the controlling on set the current page number?

    Any ideas are welcome. Thanks in advanced.
  • chaarmann
    Recognized Expert Contributor
    • Nov 2007
    • 785

    #2
    It's very hard to say anything without any code listed here.
    So I can only do some guessing here (although it's wasted time without code to verify the assumptions):

    Your website doesn't pass the page number to the server correctly, so it just defaults to first page. If the changed record is updated in the database, then it may pass only the number of the changed record.

    Just figure out which URL-parameter controls the page number (when you page forward). Then make a breakpoint in the response page (when you save the changed record) and look if this parameter is passed and set properly.

    Comment

    • KusoYumi
      New Member
      • Mar 2008
      • 11

      #3
      Yeah, thanks for comment :D You are correct, it is required to set the page parameter(eg: d-xxxxx-p) for the URL-parameter. Previously I just set the current page no, without page parameter, that's why not works!
      Thank you very much.

      Comment

      Working...