set <input type =“radio”value =“”in =“”“jsf =”“backing =”“bean =”“

时间:2017-05-10 17:36:28

标签: html html5 jsf jsf-2 jsf-2.2

=”“

我使用JSF,现在我需要通过使用普通的HTML5标签来改变收音机的样式。如何使用html标签替换此

<h:selectOneRadio id="selectedAnswer" value="#{testBean.userAnswer}" layout="pageDirection">
    <f:ajax event="change" execute="selectedAnswer" render="@none" />
        <f:selectItems value="#{testBean.question.answers}" var="selectedAnswer" itemLabel="#{selectedAnswer.answer}" itemValue="#{selectedAnswer.id}" />

</h:selectOneRadio>

用这个:

<ui:repeat var="selectedAnswer" value="#{testBean.question.answers}">
    <label for="#{selectedAnswer.id}"> 
        <input type="radio" id="#{selectedAnswer.id}" name="a-radio" value="#{selectedAnswer.id}" >

        </input> 
        <span>#{selectedAnswer.answer}</span>
    </label> 
</ui:repeat>

如何设置辅助bean中的值,在JSF中执行此操作<h:selectOneRadio value="#{testBean.userAnswer}"。在HTML中你做什么?

0 个答案:

没有答案