Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3795358
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T13:04:18+00:00 2026-05-19T13:04:18+00:00

thanks in advance for any input. I am using struts2 and jquery in this

  • 0

thanks in advance for any input. I am using struts2 and jquery in this app.

I tried to use displaytag for pagination but my tables have images and there wasn’t a way I could make displaytag work with images.

So now I have custom coded pagination which uses <s:subset> which works great so far except that I don’t know how to make it go to another page.

Basically in <s:subset> I just want to change the start attribute and then refresh my JSP. My code evaluates the start attribute correctly with a given page number.

My s:subset tag is like below,

<s:subset source="pageableList.pagedList" count="pageableList.pageSize" start="pageableList.start"  > 
            <s:iterator> 

I think I want to use <s:url> to display my clickable page numbers but I’m having trouble there.

I have my page numbers in a list (which I evaluate in my action class right after my search completes), then in my JSP where I need to display the clickable page numbers, I iterate through the list, displaying the page numbers like below –

<s:iterator value="pageNumList" > | <a href='#'> <s:property/> </a> </s:iterator>

I guess I need to pass the clicked value of page number to the action class, then since the search results are in a list in the action class, without hitting the database again just display the results page with the new value of start attribute.

Any ideas how I might do that? I have been considering using a Decider attribute with <s:subset> but maybe there is a simpler way?

Thanks again for any input.

Regards,
veeCan

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T13:04:19+00:00Added an answer on May 19, 2026 at 1:04 pm

    If you do not want to hit your DB again, cache the results of the initial query in RAM in your Action class (reference a static cache somewhere). Also, you don’t have to go with a cache-all-or-nothing approach — you can cache the first N pages and then when you near the end of the cache, fetch the rest. If you do it right, you can maintain minimum RAM footprint but preserve a snappy user experience that leverages user think time (depends on your app).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a total newbie question, so thanks in advance. I'm trying to get
Thanks for reading this. I have markup similar to what is below. Using the
thanks in advance for your help. I am wondering if there is a (design)
Thanks for reading. I'm a bit new to jQuery, and am trying to make
Thanks for reading this. I am dynamically generating some data which includes a select
Thanks for a solution in C , now I would like to achieve this
Thanks to ASP.NET MVC framework, it became possible to unit test web applications. But
Gentlepeeps, I'm new with Jquery. Apologies in advance for the basic question. I'm trying
I am facing an SQLite error though I am not using any explicit AutoCommit
I'm trying to clean up form input using the following Perl transliteration: sub ValidateInput

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.