我有一个 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 />