Hello all, In the application I'm currently working one, I want to start using the t:selectOneRadio with the spread-layout and use t:radio to position the radioButtons on the screen. The selectItems for this selectOneRadio are being created by using t:selectItems.
The code of the page look like this: <h:form> <t:selectOneRadio id="newParticipationStatus" value="#{defineParticipationBean.newParticipationStatus}" layout="spread"> <t:selectItems value="#{defineParticipationBean.availableNewStatusses}" var="status" itemLabel="#{labels[status.label]}" itemValue="#{status}" /> </t:selectOneRadio> <t:radio for="newParticipationStatus" index="0" /> <t:radio for="newParticipationStatus" index="1" /> <h:commandButton action="#{defineParticipationBean.defineParticipation}" value="#{labels.btnSave}" /> </h:form> When I try to open the page on which this code is placed I get an error: java.lang.IndexOutOfBoundsException: index 0 >= 0 at org.apache.myfaces.renderkit.html.ext.HtmlRadioRenderer.renderRadio(Html RadioRenderer.java:111) at org.apache.myfaces.renderkit.html.ext.HtmlRadioRenderer.encodeEnd(HtmlRa dioRenderer.java:59) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:539 ) at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSuppo rt.java:252) at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSuppo rt.java:249) at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSuppo rt.java:249) at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSuppo rt.java:249) at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSuppo rt.java:249) at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:5 73) .... .... I'm sure the metthod getAvailableNewStatusses() return a array of the size 2 containing the statusses needed for the selectItems. (The status are java enums and the getter returns the enum.values() ) I started to wonder if I can use t:radio in combination with t:selectItems. Did anybody try this already and got it working? If so: any suggestions on what I might be doing wrong? If you know this won't work: Any suggestions for a different approach? Any suggestions are greatly appreciated. With kind regards and thanks in advance for your time and effort, Marco Beelen ------------------------------------------------------------------------------ Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as Banyu - direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. ------------------------------------------------------------------------------