I realize that 'resting my case' is not enough...
some ideas:
this sounds like the operation 'selecting a row' should be an intrinsic feature of the repeater-widget
to some extend we already have a means of selecting (multiple) rows by putting a checkbox in every row which results in repeaterID.rowID.checkBoxID=true (e.g. contacts.0.select=true)
in this case we would however need some repeaterID.radioID=rowID
this shows that this selector-variable is not a child of the row, but of the repeater itself, furthermore I don't think it is a unique property like repeaterID.size since people might want to have more then one selection made, no?
maybe this calls for a nested <fd:selectors> in the repeater definition?
<fd:repeater id="contacts" > <fd:selectors>..</fd:selectors> <fd:widgets>...</fd:widgets> </fd:repeater>
wdyt?
Related (but different):
I'm still in preparation mode of the update on the repeater-binding
I've started to develop an idea where 'identity' would be a property of the row (which it currently doesn't have) and let the identity binding exactly bind its value into that 'space' (still have to crack up some nice way to model that, ATM I think a wrapper around a simple arraylist would do, having an equals() that checks on every element in the list)
In light of the above we could even consider sending repeaterID.radioID=row-identity (which would require to serialize-to-string somehow this identity?)
regards, -marc=
Marc Portier wrote:
Joerg Heinicke wrote:
On 12.03.2004 09:02, Marc Portier wrote:
I would like to have a repeater in which each row contains a single radio button, and where this set of radio buttons constitutes a group in the form, (i.e. have the same name).
Is there a way to do that in Cocoon Forms?
hm, I'm afraid this is not why repeaters are there, this sounds more like a case of selection-list with radio styling...
I thought of the same thing (radio buttons across repeater) when thinking about my use case:
- a person with multiple addresses (=> repeater)
- one of these addresses is the main address, that would be selected for sending letters (=> radio buttons, one in each row)
Of course I can do this via an additional widget (selection list), but I don't find this very intuitive.
WDYT?
I rest my case... thx for making me see
-marc=
-- Marc Portier http://outerthought.org/ Outerthought - Open Source, Java & XML Competence Support Center Read my weblog at http://blogs.cocoondev.org/mpo/ [EMAIL PROTECTED] [EMAIL PROTECTED]
