0

Well, i need a radioButton with more tools, like style css, buttons and etc. For this i tried to create a Pure HTML + JSF:

<c:forEach var="c"
                    items="#{questaoCurso.questao.alternativasPreenchidas}">
                    <div style="color:red;">
                        <input type="radio" name="radio_#{questaoCurso.id}" value="#{c}">
                            <h:outputText value="#{c.letra}) xx #{c.texto}" /></input>
                    </div>
                </c:forEach>

This works, show the radioButtons correctly. But i need add some eventChange to send the value selected to backing bean, how can i do it ? Something like:

onclick="mojarra.ab(...)"

Just for know, i tried it :

<h:selectOneRadio styleClass="radio"
                    value="#{cursandoMB.alternativasEscolhidas[questaoCurso]}"
                    converter="entityConverter" layout="pageDirection">
                    <c:forEach var="c"
                        items="#{questaoCurso.questao.alternativasPreenchidas}">
                        <div style="color:red;">
                        <f:selectItem itemValue="#{c}" itemLabel="#{c.letra}) #{c.texto}" />
                        </div>
                    </c:forEach>
                </h:selectOneRadio>

But selectOneRadio don't render the "div" around the selectItem, this is a problem to me. because i need it.

Ronaldo Lanhellas
  • 2,975
  • 5
  • 46
  • 92

0 Answers0