我想自定义<h:selectOneRadio>
.
就我而言,我需要<h:selectManyCheckbox>
在每个单选按钮之后放置一个。这是我到目前为止所拥有的:
<h:selectOneRadio value="#{user.Request}">
<f:selectItem itemValue="Request1" itemLabel="Request1" />
<f:selectItem itemValue="Request2" itemLabel="Request2" />
</h:selectOneRadio>
<h:selectManyCheckbox value="#{user.Request1}">
<f:selectItem itemValue="Certificate1" itemLabel="Certificate1" />
<f:selectItem itemValue="Certificate2" itemLabel="Certificate2" />
</h:selectManyCheckbox>
<h:selectManyCheckbox value="#{user.Request2}">
<f:selectItem itemValue="Certificate3" itemLabel="Certificate3" />
<f:selectItem itemValue="Certificate4" itemLabel="Certificate4" />
</h:selectManyCheckbox>
我试图将它们放在每个选择项之后:
<h:selectOneRadio value="#{user.Request}">
<f:selectItem itemValue="Request1" itemLabel="Request1" />
<h:selectManyCheckbox value="#{user.Request1}">
<f:selectItem itemValue="Certificate1" itemLabel="Certificate1" />
<f:selectItem itemValue="Certificate2" itemLabel="Certificate2" />
</h:selectManyCheckbox>
<f:selectItem itemValue="Request2" itemLabel="Request2" />
<h:selectManyCheckbox value="#{user.Request2}">
<f:selectItem itemValue="Certificate3" itemLabel="Certificate3" />
<f:selectItem itemValue="Certificate4" itemLabel="Certificate4" />
</h:selectManyCheckbox>
</h:selectOneRadio>
但它没有用。这样做的正确方法是什么?