I have a simple OneMenu in JSF:
@ManagedBean
@ViewScoped
public class ProductBean {
...
protected static Map<String, String> priceTypes;
...
getter & setter
}
<p:selectOneMenu id="sizeType" >
<f:selectItems value="#{productBean.priceTypes}" />
</p:selectOneMenu>
In my usecase, i want to preselect[1] an option out of "priceTypes" - how can i do that?
I am using Glassfish 3.1.2.2 with Primefaces 3.4.1
[1] See "selected" at http://www.w3schools.com/tags/tag_option.asp