谁能告诉我如何为primefaces下拉菜单设置默认值。默认值将来自数据表..
<h:outputLabel for="leaveType" value="Type of Leave *:" styleClass="tLabel"/>
<p:selectOneMenu id="leaveType" value="#{leaveBean.selectedLeave.leaveType}" disabled="#{leaveBean.selectedLeave.status!='Pending'}" >
<f:selectItem itemLabel="#{leaveBean.selectedLeave.leaveType}" itemValue="" />
<f:selectItems value="#{leaveBean.leaveDTO.infoBeanList}" var="lType" itemValue="#{lType.leaveTypeCode}@#{lType.leaveType}" itemLabel="#{lType.leaveType}" />
</p:selectOneMenu>