Hi there

I just finished up creating a solution using Ajaxtags and displaytags. It
works like a charm.

An actionBean creates a PaginatedList using Hibernate and returns that.
DisplayTags are used to show a paginated list while Ajaxtags are used to
make sure only a part of the page is reloaded on paging.

Result:

One action bean can return a paginated view of any type of entities from the
database.

Another page contains two paginated lists where paging happens without
interfering each other.

Basically I'm capable of adding a paginated list anywhere on a page where I
used to add a list of all items. Nice.

It is great.


Regards

Morten Matras


2008/11/6 Freddy Daoud <[EMAIL PROTECTED]>

> > I must say that my first look at ajaxtags / displaytags doesn't really
> > convince me.
> >
> > The PaginatedList interface implementation doesn't really seem to play to
> > well with Stripes. Like how do I use parameters mapped and used by
> > stripes
> > in a PaginatedList implementation, that seems to be initiated for all
> > Paging
> > calls.
> >
> > It would be nice to maintain the state / filters and stuff. Already in
> > the
> > actionBean that was used to arrive at the list of items to be shown.
>
> Sure thing Morten. You can add getters and setters to your class that
> implements PaginatedList and set the properties with
> <display:setProperty>. For example, say you have pageNumber,
> sortCriterion and sortDir properties in your implementation of
> PaginatedList (MyPaginatedList). Then, you have a property in your
> Action Bean that returns the instance:
>
> public class MyActionBean implements ActionBean {
>  private MyPaginatedList mylist;
>  // getter and setter
> }
>
> and in your JSP:
>
> <display:table id="tableItem" requestURI=""
>  name="actionBean.mylist">
>
>  <display:setProperty name="pagination.pagenumber.param"
>    value="mylist.pageNumber"/>
>
>  <display:setProperty name="pagination.sort.param"
>    value="mylist.sortCriterion"/>
>
>  <display:setProperty name="pagination.sortdirection.param"
>    value="mylist.sortDir"/>
> ...
> </display:table>
>
> This will feed back the values and you can access them in
> your action bean.
>
> Hope that helps.
>
> Cheers,
> Freddy
> http://www.stripesbook.com
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Stripes-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>



-- 
 Morten Matras
 Udviklingschef
 GAMP Media og Blob Communication ApS
 Svendsagervej 42
 5240 Odense NØ
 Tlf: 61711103
 E: [EMAIL PROTECTED]

 T: 76 654321
 W: www.blobcom.com
 E: [EMAIL PROTECTED]
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to