I am working on an application using Struts 2 and would like to display search results from Database in a pagination format.
I do get an arraylist from my action class which has multiple PERSON beans and each bean has fields like name, account, ssn etc...
Currently i am displaying all the results in one single page by extracting the bean objects from arraylist .
I have seen several posts to get this done using display tag but I am unable to get a clear cut idea as I am lame in terms of using Display tag and its dependencies.
I would really appreciate if someone could help me out in this regard.
I will get arraylist from session attribute. Arraylist has number of Person beans based on the resultset size.
I will store all the person beans into this arraylist and set in a session attribute which i retrieve in this jsp and display.
My person bean just has 3 fields account, fName and lName with getter and setter methods ().
I have even tried this without using requestURI="Search.action" in the display tag, it didn't work either.
Like i said, i am using Struts 2, so i am confused to work on this pagination issue.
If you need any additional information i can try to explain in detail, but i hope this would have given you a rough picture of my situation.
posted 11 years ago
Hey i got the solution.. Its pretty easy. I was stuck at naming conventions which the display tag will expect.
I´m new programig Struts2.
I´got a problem, with displayTag, I can see the elements and I try to pagin but every page have the same info in the columns, can clink on the page 2 or 3 o last but the info no change.
If I change the value of pagesize i can see more elements, so I think that displayTag always write the first elements.