Em 29-03-2010 15:09, Celinio Fernandes escreveu:
Thanks. I already read about it but does it work well with Struts 2 ?
Yes, I'm using it with S2. Include it in JSPs like this
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
then, for example for a listing of users:
<display:table pagesize="10" sort="list" defaultsort="1"
uid="user"
name="users"
requestURI="user_list.action">
<display:column sortable="true"
titleKey="label.name" property="name"
href="user_input.action" paramId="id"
paramProperty="userID"/>
<%-- other columns of users --%>
</display:table>
This assumes you have a list of beans called "users" in your action,
with a propertry named "name", with getters/setters.
Of course, if performance is a problem pagination would be best done at
DB level as Adam suggested.
--- On Mon, 3/29/10, Alex Rodriguez Lopez<alo...@flordeutopia.pt> wrote:
From: Alex Rodriguez Lopez<alo...@flordeutopia.pt>
Subject: Re: Pagination with Struts 2.1.8 ?
To: user@struts.apache.org
Date: Monday, March 29, 2010, 4:32 AM
Display tag, works like a charm:
http://displaytag.sourceforge.net/1.2/tut_basic.html
Works with lists and handles pagination, data export, I recommend it!
Em 29-03-2010 11:07, Celinio Fernandes escreveu:
Hi,
This is a classic requirement.
I have this table, in a JSP, that I have created with the<table> html tag and that
i have filled using the<s:iterator>.
This<s:iterator> tag iterates over an ArrayList defined in my action.
There are too many lines and I need to add some pagination functionality to it.
What solutions are out there and which one do you recommend ?
Thanks for your feedback.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org