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

  • SEARCH
  • Home
  • 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 9295881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T21:42:43+00:00 2026-06-18T21:42:43+00:00

How can I implement paging in Struts 2 for the client side display and

  • 0

How can I implement paging in Struts 2 for the client side display and Hibernate as the persistence layer.

Here is the code that I have done so far:

<display:table id="students" name="students" pagesize="2"
    export="false" requestURI="/student">
    <display:column property="studentRoll" title="Roll"
        paramId="studentRoll" sortable="true" />
    <display:column property="studentName" title="Name" sortable="true" />
    <display:column property="studentCourse" title="Course"
        sortable="true" />
    <display:setProperty name="paging.banner.placement" value="bottom" />
</display:table>

Is there any way to implement this without display tag?

  • 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-06-18T21:42:44+00:00Added an answer on June 18, 2026 at 9:42 pm

    There’s a way to implement it and I will give you some recommendations. May be it’s not that you are looking for but with the display tag I’m really doubt that you can implement something don’t care to say that word. The display tag is a library created to simplify representation of tabular data on the web and already old enough to use it with the modern technologies like Ajax and component based scripting libraries like jQuery, etc. Even I’ve seen the display tag ajaxified but I see this is nothing more just adding the complexity to the problematic architecture. Needed to add here the nature of the display tag library it is property based. And it was created with the purpose to simplify usage or the development process that time. Nowadays people doesn’t limit themselves with the custom and ugly solutions.

    Now looking at the code if I can say that is a code, the tag represents the table with rows and columns given the possibility to customize them with labels, headers, other HTML attributes, even with CSS but this is out of this question.

    The attribute name represent a variable with the data structure representing a tabular data. It could be a list of lists or a set of objects doesn’t matter. What’s the matter it could be iterable and have rows and columns.

    The attribute pagesize points to the number of records per page.

    The given URI even doesn’t remember what it is to feed the data from the server or just for escape.

    And near the end of the tag is the banner placement, set with the property. So you even doesn’t have to implement any code with it just setting properties for customization.

    Now, to represent the table with data in Struts2 there’s an

    <s:iterator var="row" begin="0" value="#request.navigator.list">
    

    tag, the list is students or something else doesn’t matter. The navigator is the object similar to the banner in display tag, but not a component here. The component navigator with the buttons I will describe later.

    Inside the iterator you may have any content representing the row. But this out of the question.

    The navigator as the component could be given different ways simply for example

    <s:property value="#request.navigator.bar" escapeHtml="false"/>  
    

    Then the data in the list are fetched from the database via SQL or HQL or Criteria API doesn’t matter. This is done in two steps. First checked the total number of records wishing to return. It gives the possibility to move at the end and not exceed the pagesize. Then return limited number of rows needed to represent on the page. These all done in the action that displays the table. The action to work needs two parameters the first row and pagesize. This is also needed to correct the navigator if the total number of records changed.

    That’s what I wanted to answer about how to implement the page navigation logic. I tried to not to write many, many code as for it out of question.

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

Sidebar

Related Questions

I need to implement a paging solution using Struts2 for the client side display
Can anyone tell me how can I implement server-side paging with client-side Kendo UI
I have datagrid with paging enabled that can have 10 rows per page. Also
can any one have idea how to implement custom paging in silverlight / telerik
I am trying to implement paging and i done that. The problem is when
Can someone please tell me how I can implement the following line of pseudo-code.
I know that classes can implement various special methods, such as __iter__ , __setitem__
I'd like to know if I can implement a method on MemoryCache that removes
enter code here hi. i am trying to implment custom paging in datalist control
Can i implement both the paging and zooming of imageview in a uiscrollview at

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.