cancel
Showing results for 
Search instead for 
Did you mean: 

(Next Page, Previous Page) in Struts Framework

Former Member
0 Kudos

Hi folks

Just wanted to know if anyone could have an idea how to realize a <b>next page, previous page</b> navigation on table-data from an <b>ArrayListBean</b> in <b>Struts-Framework</b>.

currently i'm using <logic:iterate/> to iterate through the elements of the bean, but as there are about 4000 objects in the bean, displaying the whole contents on one page makes the browser go a bit slowly and hang up on older systems...

found nothing on this topic so far so i wonder if anyone could have good ideas.

thx a lot

lars

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Lars,

You can use Pager-taglib.tld which should be present in your APP server at "WEB-INF/lib/" location. This TLD is very simple and just serves the purpose. Hope the below link provides the helps you are looking for

<a href="http://jsptags.com/tags/navigation/pager/pager-taglib-2.0.html">Pager-taglib</a>.

It contains some real search engine pagination implementations and should definitely help you.

Answers (1)

Answers (1)

Former Member
0 Kudos

Lars,

<a href="http://displaytag.sourceforge.net/11/">Display Tag</a> provides pagenation feature that you are looking for.

Regards,

Chaitanya

Former Member
0 Kudos

hi Chaitanya,

thank you for your helpful answer. i guess that's the right thing i searched for.

But now i got a little problem while implementing this:

the problem:

how to realize a "column-break" in the output?

if i'm using

<display:column property="xyz"/>

to iterate through the whole values, the columns are just added to the right of the table.

but i want to present them the following way.

column 1 | column 2 | colum 3

value 1 | value 2 | value 3

column4 | column 5 | column 6

value 4 | value 5 | value 6

it's a bit compicated, but i'm planning to to so because i want to hide and show the second row via click on the first row - so that informations which are detailed information are held back in default and are just shown with a click on the first line.

would be very nice of you've got a solution.

i just found something about nested tables in the tag-examples, which seemed to be

the right way, but those nested tables can be just used in columns and not in seperate rows

thx a lot,

lars

Former Member
0 Kudos

Lars,

Unfortunately, there doesnt seem to be any option with display tag to have a column-break in output.

Display tag does provide sub table concept inside a row (nested table as you have mentioned), but to exactly fit your requirement I reckon you might have to use another table just beside the existing one and this table should display the rest of columns which are to be displayed with an internal scroll.

However before you could think about implementing you need to be sure about setting the rowIndex property to both tables at the same time while clicking on next page icon.

Do let me know if I'm not clear about this.

Regards,

Chaitanya