Hi All,
I have been trying to display in the JSP a long set of results from a query
to database. Results will be displayed with a usual html <table> tag. No
problem to display the whole bunch of results in a single JSP. In the other
hand, parameters offset and length allow us to choose a subset in the
collection to render.
The problem appears, when we want to display such a results spread along
different pages, I mean, with a pagination mechanism. As length and offset
has fixed values for the JSP, I have not found a way to scroll up and down
in the collection.
We have fixed this issue, by overriding logic:iterate, and allowing the tag
to load offset from a request parameter, previously to the parameter defined
in the tag in the JSP. Now, by sending the query to the same JSP and
appending a parameter offset in the query string, we can scroll, since tag
gives preference to the offset parameter from the request to the one in the
JSP.
Some lines of javascript to generate the right links with the appended
offset parameter to the query string make the trick.
Would be this addition interesting for Struts logic:iterate tag? It is a
quite simple enhacement, and does not modify at all the current behaviour.
It is just an idea.
Regards,
Adolfo.
<HTML>
<HEAD>
<TITLE>Adolfo's signature</TITLE>
</HEAD>
<BODY>
<center><b><em>Adolfo Rodriguez Miguelez</em><b></center>
</BODY>
</HTML>
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>