>From: Richard Wallace <[EMAIL PROTECTED]> > > Hello, > > I'm trying to use radio buttons to do a questionnaire with the questions > pulled from a backing bean. There are examples of using select menus in > the use-cases but I don't see anything about how to use radio buttons. >
The radio list "selectOneRadio" is very similar to the "selectOneMenu" in that both require child "selectItems" component or "selectItem"s components. So, there is not really any html equivalentcy but you can use a "select" and supply a jsfid of "selectOneRadio". But, this won't give you the html mockup. <select jsfid="selectOneRadio"> <option value="1"> One <option value="2">Two </select> Another option would be to use the "void" jsfid and span tags. <span jsfid=void allowbody=false> <input type=radio value=1> </span> <span jsfid="selectOneRadio"><span jsfid=selectItem itemValue=One itemLabel=1/><span jsfid=selectItem itemValue=Two itemLabel=2/></span> So, the first span bound to a "void" jsfid will be removed. The second will represent the radio list. But, the "selectOneRadio" can not have any whitespace characters. The html parser actually adds whitespace as a verbatim components. All of the html template is represented by components. This is different than how JSP handles the view. Clay's method is actually much simpler than trying to interweave jsp output with component output. Anyway, the selectOneRadio component will not allow a verbatim/outputText child component. The html "select" has an implicit mapping to the "selectOneMenu" component. The builder knows to strip out html white space nodes under the "select" node. I guess this is a bug. We should handle this for the span node like the select node or allow the html input node to allow children. The parser assumes that the "input" node is self terminating. >But am getting the error "A duplicate component id (response) was found >within the same naming container (renderId="123" jsfid="selectOneRadio" The duplicate id is coming from the fact that you have given all the components the same html name attribute. The name or id attribute is mapped to the component's id. You are correct on the "selectOneRadio" mapping. I think that I've given you a couple options but please file a bug ticket on this one. Gary > Thanks, > Rich > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >