如何在JSF中编写下拉框?

时间:2009-08-15 09:35:09

标签: jsf drop-down-menu

如何在JSF中编写下拉框?

1 个答案:

答案 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>