Thanks very much,Thorsten !
>IMO the best is to limit this in the usecase java class, meaning you
>just send the list you want to show and the "page" you are right now.
I try to do this options.
Thorsten Scherler-3 wrote:
>
> El lun, 26-01-2009 a las 00:45 -0800, Frank Hamilton escribió:
>> Hi,
>>
>
> Hi Frank,
>
> to start with if you are looking into pagination out of performance
> consideration, then you may look into cocoon pagination.
>
> See my recent post "How to use pipeline instead of jx for the view
> layer" for more information about that.
>
>> i have a jx file for presentation layer. In this file I write a table
>> with
>> the elements of a List that I get in de jx with
>> usecase.getParameter(listUser).
>> .
>> .
>>
>> <jx:forEach var="lstEve" items="${usecase.getParameter('listUser')}">
>> <tr class="forms-row-${repeaterLoop.index % 2}">
>> <td><jx:out value="${lstEve.getNombre()}"/></td>
>> <td>
>> <p>
>> <jx:out
>> value="${lstEve.getDiaInicio()}"/>
>> </p>
>> <p>
>> <jx:out
>> value="${lstEve.getMesInicio()}"/>
>> </p>
>> <p>
>> <jx:out
>> value="${lstEve.getAnioInicio()}"/>
>> </p>
>> </td>
>> </tr>
>> .
>> .
>> I need to paginate that. Any ideas, Thanks!
>
> IMO the best is to limit this in the usecase java class, meaning you
> just send the list you want to show and the "page" you are right now.
>
> ...
> int page = usecase.getParameter(listUserPage).
> List listUser = getUsers(page);
> usecase.addParamerter(LIST_USER,listUser);
> usecase.addParamerter(LIST_CURRENT_PAGE,listUserPage);
> ...
>
> private List getUsers(int page){
> // connect to your ac provider and get all user
> List allUser = acProvider.getAll();
> List filteredUser = // filter list to only return the next page and then
> return filteredUser;
> }
>
> HTH
> salu2
> --
> Thorsten Scherler <thorsten.at.apache.org>
> Open Source Java <consulting, training and solutions>
>
> Sociedad Andaluza para el Desarrollo de la Sociedad
> de la Información, S.A.U. (SADESI)
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
--
View this message in context:
http://www.nabble.com/How-to-use-pagination-in-.jx-tp21662052p21664627.html
Sent from the Lenya - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]