can anyone please tell me how to set a default value to the primefaces dropdown. the defauklt value will be coming from the datatable..
<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>