The label of the selectItem is combined by the item value and a description text. If i select a item the whole itemLabel will be displayed in the textbox. I would like to change that, the textbox should only display the itemValue of the selectedItem and not the Label. So instead of "0 - Variante #0" only "0".
How i fill the menu:
<p:selectOneMenu id="z2Menu" value="#{createCarProject.z2}">
<f:selectItem itemLabel="" itemValue="" />
<f:selectItems value="#{createCarProject.z_list}" var="i" itemLabel="#{i.value} - #{i.label}" itemValue="#{i.value}"/>
</p:selectOneMenu>
.
I think the only way is changing the CSS style with JS. I put an example: