cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oceatoon <t.katelb...@systheo.com>
Subject Re: CForms:Selection List generated Repeater ??
Date Mon, 30 May 2005 11:16:57 GMT
>>filled through binding or on-create listener and this would be yet another
>>initialisation possiblity.

> 
> So what do you suggest: a new "mapped-repeater" widget which extends
> repeater with a selection-list to create the rows?
exactly, the selection-list could be placed on any widget inside the
repeater making that particular widget the base to the generation of the
repeater, all the other widgets are copied as a new row, only the
particular widget has a set value on creation, or there could even be a
more complex selectionlist where each widget would have an initial value
(as attributes of an item).

> There is a problem though: how would the repeater be loaded from
> existing data? What is the role of the selection list in that case?
This repeater could be concidered like a combo (select) with widgets
associated, so we can add or remove elements in the list without worrying
about the other associated widgets. if an item is removed, then the data
wont be accessed anymore (binding rules) , and if an item is added the rows
are empty.

WDYT ?

> 
>>sorry persistent I am.
> 
> This I have seen :-)
lol


Definiton Example
**********
This repeater would be mapped on the label widget and would have 4 rows

<fd:repeater id="myrep">
                <fd:selection-list-map widget="label">
                    <fd:item value="one"/>
                    <fd:item value="two"/>
                    <fd:item value="three"/>
                    <fd:item value="four"/>
                </fd:selection-list-map>
            <fd:widgets>
                <fd:output id="label">
                    <fd:datatype base="string"/>
                </fd:output>
                <fd:field id="text1">
                    <fd:datatype base="string"/>
                </fd:field>
                <fd:field id="text2">
                    <fd:datatype base="string"/>
                     <fd:selection-list src="cocoon://src"/>
                </fd:field>
            </fd:widgets>
        </fd:repeater>


Mime
View raw message