You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Adolfo Miguelez <pe...@hotmail.com> on 2002/07/17 12:31:06 UTC

logic:iterate enhacement proposal

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>





_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: logic:iterate enhacement proposal

Posted by Malcolm Wise <ma...@sde.eu.sony.com>.
Adolfo,

You could also try the pager taglib available at
http://jsptags.com/tags/navigation/pager/
Works well with logic:iterate.
Just a thought!

Malc

-----Original Message-----
From: Adolfo Miguelez [mailto:pelly69@hotmail.com]
Sent: 17 July 2002 11:31
To: struts-user@jakarta.apache.org
Subject: logic:iterate enhacement proposal



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>





_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



*************************************************************************
The information contained in this message or any of its
attachments may be privileged and confidential and intended 
for the exclusive use of the addressee. If you are not the
addressee any disclosure, reproduction, distribution or other
dissemination or use of this communication is strictly prohibited
*************************************************************************

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>