cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <lgaw...@mobilebox.pl>
Subject Re: CForms:Selection List generated Repeater ??
Date Mon, 30 May 2005 07:40:55 GMT
Antonio Gallardo wrote:
> On Dom, 29 de Mayo de 2005, 11:31, oceatoon dijo:
> 
>>Hi everyone
>>As I can see there are quite a bit of movement around selection-list, I'll
>>reopen an old request of mine about repeaters being able to be generated
>>from a selection list.
> 
> 
>>Meaning if a selection list is positionned on a
>>widget inside a repeater, the repeater will generate as many rows that
>>contains the selection list.
> 
> 
> Do you mean to feed a Repeater from an Array?
> 
> 
>>Example:
>>my repeater contains a label outputfield, and a few field widgets
>>if the label is made "selectionlistable" this would generate as many rows
>>as contained in the Selectionlist, with the different labels.
> 
> 
>>I already do this programaticaly on binding but it seems to me, its real
>>place is in the model as a simple declaration.
> 
> 
> Not sure if this is the same I have in mind. But it can helps when showing
> results of a search. For example, in one form whe show the posible
> criteria for the search, when the users send the request, we consult the
> DB and fetch the rows meeting the result. We are currently using
> jxtemplate for this purpose.
> 
> Thinking in that, a way to save developer time is (and I will also like to
> see it implemented) a "paginatable repeaters" with "back-page",
> "next-page" buttons. or soething similar.
In order to create a paginatable repeater you have two choices:
1. Simpler (hardly usable). You feed the repeater with all the data 
(i.e. 1000 rows) and then paginate showing only 10 at the time. This is 
how paginate transformer works. It is totally unusable for large 
portions of data because of the resources needed to fetch and store data.

2. Harder. You fetch only what you need basing on current view. Some 
kind of modified binding would be needed which would pass an information 
to some function which portion of data is needed. This means that form 
model is no longer 'static'. It's getting harder with every minute: Now 
that you do not hold a full data set you also need to know what is the 
total amount of rows to provide information like 'This is page 2/16'. 
Moreover a paginated repeater is nothing without filtering capabilities 
so apart from knowing the 'window' position you have to pass also some 
filtering attributes to binding function.

-- 
Leszek Gawron                                      lgawron@mobilebox.pl
IT Manager                                         MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

Mime
View raw message