selectOneRadio using custom and ui:repeat cannot click label on primefaces

Posted: December 21, 2012 in web

Weird Fix: make sure under ui:repeat use the same id (“opt”) for radioButton and outputLabel

        <p:outputPanel id="customPanel">
            <p:selectOneRadio id="selectedCar" value="#{bean.selectedCarID}" layout="custom">
                <p:ajax update="customPanel" />
                <f:selectItems var="car"
                    itemValue="#{car.carId}" />
            <ui:repeat var="car"
                value="#{}" varStatus="status">
                <h:panelGrid columns="2">
                    <p:radioButton id="opt" for="selectedCar"
                        itemIndex="#{status.index}" />
                    <h:outputLabel for="opt" value="#{}" />

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s