jspx source code:--
<af:selectOneChoice binding="#{backing_bean.selectOneChoice1}">
<af:selectItem label="Yes" value="Y"/>
<af:selectItem label="No" value="N"/>
</af:selectOneChoice>
<af:selectOneChoice binding="#{backing_bean.selectOneChoice1}">
<af:selectItem label="Yes" value="Y"/>
<af:selectItem label="No" value="N"/>
</af:selectOneChoice>
Backing bean setter method:--
public void setSelectOneChoice1(CoreSelectOneChoice selectOneChoice1) {
this.selectOneChoice1 = selectOneChoice1;
if (this.selectOneChoice1.getValue() == null) {
this.selectOneChoice1.setValue("Y");
}
}
如果是使用的LOV, 那么设置的就应该是默认值所对应的在这个数据集合中的索引.