title: How to set a default value primefaces dropdown?
body: <p>can anyone please tell me how to set a default value to the primefaces dropdown. the defauklt value will be coming from the datatable..</p>
  
  <pre><code>&lt;h:outputLabel for="leaveType" value="Type of Leave *:" styleClass="tLabel"/&gt;
  &lt;p:selectOneMenu id="leaveType" value="#{leaveBean.selectedLeave.leaveType}" disabled="#{leaveBean.selectedLeave.status!='Pending'}" &gt;
  &lt;f:selectItem itemLabel="#{leaveBean.selectedLeave.leaveType}" itemValue="" /&gt;
  &lt;f:selectItems value="#{leaveBean.leaveDTO.infoBeanList}" var="lType" itemValue="#{lType.leaveTypeCode}@#{lType.leaveType}" itemLabel="#{lType.leaveType}" /&gt;
  &lt;/p:selectOneMenu&gt;
  </code></pre>