0
我有一個selectOneListBox,使用hashmap的鍵作爲標籤和值作爲值填充。設置一個SelectOneListbox默認選擇,它是從一個哈希映射中填充的
如何設置列表中作爲默認選擇的第一個對象,因此它看起來突出
<!--the list box containing the results from the search-->
<h:form id="newPointsResultList" styleClass="simpleformstyle">
<p:selectOneListbox id="selectedPoints_listbox"
value="#{mapBean.selectedPoint}"
converter="omnifaces.SelectItemsConverter"
scrollHeight="395"
styleClass="simpleformstyle10"
rendered="#{not empty mapBean.newPointsHashMap}" >
<f:selectItems value="#{mapBean.newPointsHashMap}" />
<p:ajax listener="#{mapBean.valueChanged}" update=":newPointsGrid:selectedPoint_grid" process="@this" />
<f:param name="idUser" value="#{mapBean.tipTourUser.idUser}" />
</p:selectOneListbox>
</h:form>
<br />