如何在JSF中编写下拉框?
答案 0 :(得分:8)
To select one option
<h:selectOneMenu id="list1">
<f:selectItem itemLabel="Option 1" itemValue="1"></f:selectItem>
</h:selectOneMenu>
To select multiple option
<h:selectManyListbox id="list">
<f:selectItems value="#{optionBean.optionList}"></f:selectItem>
</h:selectManyListbox>