struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stahlhut, Axel" <Axel.Stahl...@tui.de>
Subject AW: Paged data output
Date Wed, 10 Nov 2004 12:36:32 GMT
Hi Yaroslav,

try the displaytag tag library (http://displaytag.sourceforge.net/). Maybe it is useful.

Regards
Axel

> -----Urspr√ľngliche Nachricht-----
> Von: Yaroslav Novytskyy [mailto:YNovytskyy@mail.lviv.ua] 
> Gesendet: Mittwoch, 10. November 2004 12:55
> An: user@struts.apache.org
> Betreff: Paged data output
> 
> 
> Hi all!
> 
> Can anyone explain (or point to an example) of how to output 
> data on JSP by pages with page navigation.
> 
> Example:
> I have a products DB table with _lots_ of products.
> then (as far as I could understand) I should
> 1. create a DAO factory
> 2. create a ProductDAO class
> 3. create a Product bean-type class
> 4. in ProductDAO create a method listProducts in which
>   a) make a quiery like SELECT * FROM Products
>   b) for every row create a Product object and add to a list
>   c) return the list to action
> 5. in action.execute save the list in request scope
> 6. redirect to JSPwith the following logic:
>     <logic:iterate id="item" name="Articles">
>     <bean:write name="item" property="ID" />
>     <bean:write name="item" property="Name" />
>     </logic:iterate>
> 
> Question:
> If the described abow is correct, how to make paged output. 
> So only 10 
> products are displayed and links to 2nd, 3rd ... pages
> 
> Thanks
> Yaroslav Novytskyy
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message