[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xml-cocoon-dev
Subject:    Re: CForms:Selection List generated Repeater ??
From:       oceatoon <t.katelbach () systheo ! com>
Date:       2005-05-30 10:40:42
Message-ID: d7eqa1$27b$1 () sea ! gmane ! org
[Download RAW message or body]

>>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>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic