cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oceatoon <t.katelb...@systheo.com>
Subject CForms : Repeater and Selection-lists ?
Date Tue, 09 Aug 2005 17:12:56 GMT
Hi everyone,
sorry for the length of the post.

What I intend to do :
I want to be able to put a selection-list in the model declaration of a
repeater so it will be created with as many rows as items as in the SL. I
would also like to link a widget in my repeater with the items row.
The advantage of this repeater filling is that the external
file(select-list) on which the repeater is filled can be modified at
anytime without having to change any structure in the database. 

I have started looking into Field src code to see how things are done for
setting up selection lists, because I don't want to go wrong so if someone
could please point me in the right direction i'd really appreciate it. I'm
also concidering doing it in flow, or using repeater-actions and on-xxxx to
set this up with Javascript on the creation event but this isn't really
clear, any advice would be greatly appreciated.

Example :
<fd:repeater id="activities">
<fd:selection-list src="cocoon://selection-list/activities" widget="label"/>
<fd:widgets>
        <fd:output id="idactivity">
           <fd:datatype base="string"/>
        </fd:output>
        <fd:output id="label">
          <fd:datatype base="string"/>
        </fd:output>
        <fd:field id="km"/>
</fd:widgets>
</fd:repeater>

So my "activities" Repeater contains as many rows as items in my Sel-List
("cocoon://selection-list/activities") and each row's "label" widget will
carry the items value.

offcourse the problems is in the binding and with existing items that might
allready be in the repeater. an idea is to insert only the rows that aren't
allready in the repeater and a sort of cleaner where on binding all rows
with no values specified are removed.


Greatly appreciate any thoughts.
Regards
Tibor 


Mime
View raw message