how to set the default in dropdown?
I have dropdown with dynamic v开发者_开发技巧alues.for example in dropdown have 1,5,10,20.
when page loading need to display the 5 only.How to do in the jsf ?
Preset the property associated with the value
attribute with the desired value in bean's constructor.
public Bean() {
this.selectedItem = 5;
}
精彩评论