我尝试从DB中的值自动选择下拉列表选项。
<td class="labelInfo">Processing</td>
<td class="cellInfo" width="35%"><h:selectOneMenu value="#{visaAction.visaBean.processing}">
<f:selectItem itemValue="" itemLabel="---Select---" />
<f:selectItem itemValue="Normal" itemLabel="Normal" />
<f:selectItem itemValue="Urgent" itemLabel="Urgent" />
</h:selectOneMenu>
</td>
<td class="labelInfo"><SPAN class="star">Group Membership(if Any)</SPAN></td>
<td class="cellInfo" width="35%"><h:selectOneMenu value="#{visaAction.visaBean.groupMembership}">
<f:selectItem itemValue="" itemLabel="---Select---" />
<f:selectItem itemValue="Main/Only" itemLabel="Main/Only" />
<f:selectItem itemValue="Son" itemLabel="Son" />
<f:selectItem itemValue="Daughter" itemLabel="Daughter" />
<f:selectItem itemValue="Wife" itemLabel="Wife" />
</h:selectOneMenu></td>
如何从DB检索值并将这些值设置为JSF页面