title: Struts2 & jquery - custom pagination - how to go to page2 without hitting the db again
body: <p>thanks in advance for any input. I am using struts2 and jquery in this app. </p>
  
  <p>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. </p>
  
  <p>So now I have custom coded pagination which uses <code>&lt;s:subset&gt;</code> which works great so far except that I don't know how to make it go to another page. </p>
  
  <p>Basically in <code>&lt;s:subset&gt;</code> 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. </p>
  
  <p>My s:subset tag is like below, </p>
  
  <pre><code>&lt;s:subset source="pageableList.pagedList" count="pageableList.pageSize" start="pageableList.start"  &gt; 
              &lt;s:iterator&gt; 
  </code></pre>
  
  <p>I think I want to use <code>&lt;s:url&gt;</code> to display my clickable page numbers but I'm having trouble there. </p>
  
  <p>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 - </p>
  
  <pre><code>&lt;s:iterator value="pageNumList" &gt; | &lt;a href='#'&gt; &lt;s:property/&gt; &lt;/a&gt; &lt;/s:iterator&gt;
  </code></pre>
  
  <p>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. </p>
  
  <p>Any ideas how I might do that? I have been considering using a Decider attribute with <code>&lt;s:subset&gt;</code> but maybe there is a simpler way?</p>
  
  <p>Thanks again for any input.</p>
  
  <p>Regards,
  veeCan</p>