cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Portier <...@outerthought.org>
Subject Re: [cforms] Radio buttons across repeater
Date Fri, 12 Mar 2004 08:02:34 GMT


Mark Lundquist wrote:

> 
> On Mar 11, 2004, at 12:18 PM, Mark Lundquist wrote:
> 
>> Hi,
>>
>> 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?
> 
> 
> OK, I think the way to do it would be to interpose a stylesheet between 
> the Woody template transformer and the woody stylesheet, so that I could 
> get the first crack at the widget instance elements.
> 
> Anyway, I'm not gonna go with that style of form, for unrelated reasons.
> 

hm, I'm afraid this is not why repeaters are there,
this sounds more like a case of selection-list with radio styling...

see the samples form1.xml and form1_template.xml for the field 'cowheight'

- in the model you define it as a field with a nested selection-list
- in the template you just add styling list-type="radio"

explanation: if you talk about a repeater, then you think about some 
kind of a 1-M relation between the form and the various widgets inside 
the repeater.  In this case you just want ONE value, so you only want 
one widget. The fact that the selection-list is presented as a set of 
radio-buttons is a styling only issue. (at least according to the 
filosophy of cforms)

HTH

-marc=

> ~ Mark
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 

-- 
Marc Portier                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at                http://blogs.cocoondev.org/mpo/
mpo@outerthought.org                              mpo@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message