简体   繁体   中英

p:selectOneMenu list not displaying properly

I have ap:selectOneMenu in xhtml. But the list is not displaying properly. The list have near to 70 items. When I click on the selectOneMenu, the list populate upwards instead without scrollbar and I can't see all the items.

<td valign="top"><p:selectOneMenu id="fr1022_combo_box_ctpy"
      value="#{pc_Fr1022.w_facility.ctpy}" styleClass="selectOneMenu">
      <f:selectItems value="#{pc_Fr1022.w_facility.facilityCtpyList}"></f:selectItems>
  </p:selectOneMenu>
</td>

I believe the way you have used f:selectItems is incorrect. It should be

<f:selectItems value="#{pc_Fr1022.w_facility.facilityCtpyList}" var="facility"
                       itemLabel="#{facility.name}" itemValue="#{facility.value}" />

HTH

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM