You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Luca Passani <pa...@eunet.no> on 2005/08/31 21:50:22 UTC

JSTL, struts and pagination

people, what's the elegant way to do pagination with JSTL?
I am using struts, my Action generates a LinkedList which a JSP page
is supposed to visualize:

  <c:forEach var="item"  items="${content_list}">
         <c:out value="${item.name}"/><br />
  </c:forEach>


I'd like the JSP to recognize long lists and split it in pages, possibly
with backward and forward navigation. I would really like to avoid scriptlets.
BTW is pagination part of the view or is it part of the business logic
according to struts?

Thanks

Luca


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


Re: JSTL, struts and pagination

Posted by Lorenzo Siclia <ar...@kemen.it>.
On Wednesday 31 August 2005 21:50, Luca Passani wrote:
> people, what's the elegant way to do pagination with JSTL?
> I am using struts, my Action generates a LinkedList which a JSP page
> is supposed to visualize:
>
>   <c:forEach var="item"  items="${content_list}">
>          <c:out value="${item.name}"/><br />
>   </c:forEach>
>
>
> I'd like the JSP to recognize long lists and split it in pages, possibly
> with backward and forward navigation. I would really like to avoid
> scriptlets. BTW is pagination part of the view or is it part of the
> business logic according to struts?

You can try this tag:
http://displaytag.sourceforge.net/

regards Lorenzo

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


Re: JSTL, struts and pagination

Posted by Martin Cooper <mf...@gmail.com>.
On 8/31/05, Chandramohan Mani <ch...@gmail.com> wrote:
> 
> pagination is not a part of view...


I beg to differ. If you're going to divide the world up into M, V and C, it 
is certainly part of the view, since it has to do with which part of the 
model is being presented to the user, and how to navigate within a portion 
of model data.

This, and the first link from the comments, is an interesting discussion of 
Web MVC:

http://osteele.com/archives/2004/08/web-mvc

--
Martin Cooper


On 9/1/05, Luca Passani <pa...@eunet.no> wrote:
> >
> > people, what's the elegant way to do pagination with JSTL?
> > I am using struts, my Action generates a LinkedList which a JSP page
> > is supposed to visualize:
> >
> > <c:forEach var="item" items="${content_list}">
> > <c:out value="${item.name <http://item.name> <http://item.name>}"/><br 
> />
> > </c:forEach>
> >
> >
> > I'd like the JSP to recognize long lists and split it in pages, possibly
> > with backward and forward navigation. I would really like to avoid
> > scriptlets.
> > BTW is pagination part of the view or is it part of the business logic
> > according to struts?
> >
> > Thanks
> >
> > Luca
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
> >
> >
> 
> 
> --
> Chandramohan Mani
> vMoksha Technologies.,
> chandramohan@vmoksha.com
> +91 (80) 25053500 ext 364
> 
> "Many of life's failure are people
> who did not realize how close
> they were to success when they
> gave up" - Thomas Edison
> 
>

Re: JSTL, struts and pagination

Posted by Chandramohan Mani <ch...@gmail.com>.
pagination is not a part of view... 


 On 9/1/05, Luca Passani <pa...@eunet.no> wrote: 
> 
> people, what's the elegant way to do pagination with JSTL?
> I am using struts, my Action generates a LinkedList which a JSP page
> is supposed to visualize:
> 
> <c:forEach var="item" items="${content_list}">
> <c:out value="${item.name <http://item.name>}"/><br />
> </c:forEach>
> 
> 
> I'd like the JSP to recognize long lists and split it in pages, possibly
> with backward and forward navigation. I would really like to avoid 
> scriptlets.
> BTW is pagination part of the view or is it part of the business logic
> according to struts?
> 
> Thanks
> 
> Luca
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
> 
> 


-- 
Chandramohan Mani
vMoksha Technologies.,
chandramohan@vmoksha.com
+91 (80) 25053500 ext 364

"Many of life's failure are people 
who did not realize how close
they were to success when they 
gave up" - Thomas Edison

RE: [opencms] JSTL, struts and pagination

Posted by Jorge González <in...@hotelparadisepark.com>.
Take a look at:

- http://valuelist.sourceforge.net/
- http://struts.application-servers.com/index.html
- http://jsptags.com/tags/navigation/pager/index.jsp
- http://displaytag.homeip.net/example-pse.jsp


And tell me if you find what you need here.

I've used displaytag, and it's great.

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