You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Paweł Badeński <pa...@gmail.com> on 2008/05/01 16:26:42 UTC
Paging with DisplayTag and encoded table name
Hi,
I want to implement paging with DisplayTag, but I'm stuck with encoded
table name (d-<number>-p). As for now I have my Action implement
ParameterAware and manually grab the page number from the map. I'm
curious if there is a neat way to have the page parameter mapped onto
action or something alike (so I don't have to expose any request data
structures to an action).
Thanks in advance,
Pawel
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Paging with DisplayTag and encoded table name
Posted by Paweł Badeński <pa...@gmail.com>.
2008/5/2, Zoran Avtarovski <zo...@sparecreative.com>:
> You can implement the org.displaytag.pagination.PaginatedList class and use
> any parameters you like. Also helps when dealing with large lists.
>
> Z.
>
>
>
> > 2008/5/1 Brad A Cupit <br...@lsu.edu>:
> >>> > > I'm curious if there is a neat way to have the page
> >>> > > parameter mapped onto action or something alike
> >> >
> >> > You should be able to put a setter on the Action. So, if your url
> >> parameter is named pageNum, your action would have a setPageNum() method.
> >
> > Sure, that'd have worked. But DisplayTag keeps information about page
> > Number in very specific format - "d-<encoded_table_name>-p", so it
> > might look like "d-339584-p".
> >
>
Thanks a lot ! Works perfectly :)
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Paging with DisplayTag and encoded table name
Posted by Zoran Avtarovski <zo...@sparecreative.com>.
You can implement the org.displaytag.pagination.PaginatedList class and use
any parameters you like. Also helps when dealing with large lists.
Z.
> 2008/5/1 Brad A Cupit <br...@lsu.edu>:
>>> > > I'm curious if there is a neat way to have the page
>>> > > parameter mapped onto action or something alike
>> >
>> > You should be able to put a setter on the Action. So, if your url
>> parameter is named pageNum, your action would have a setPageNum() method.
>
> Sure, that'd have worked. But DisplayTag keeps information about page
> Number in very specific format - "d-<encoded_table_name>-p", so it
> might look like "d-339584-p".
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
Re: Paging with DisplayTag and encoded table name
Posted by Paweł Badeński <pa...@gmail.com>.
2008/5/1 Brad A Cupit <br...@lsu.edu>:
> > I'm curious if there is a neat way to have the page
> > parameter mapped onto action or something alike
>
> You should be able to put a setter on the Action. So, if your url parameter is named pageNum, your action would have a setPageNum() method.
Sure, that'd have worked. But DisplayTag keeps information about page
Number in very specific format - "d-<encoded_table_name>-p", so it
might look like "d-339584-p".
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Paging with DisplayTag and encoded table name
Posted by Brad A Cupit <br...@lsu.edu>.
> I'm curious if there is a neat way to have the page
> parameter mapped onto action or something alike
You should be able to put a setter on the Action. So, if your url parameter is named pageNum, your action would have a setPageNum() method.
Brad Cupit
Louisiana State University - UIS