I am trying to set the value of <h:selectOneMenu>
using the bean setter, but it is not working. Here is my .xml code:
<h:selectOneMenu value="#{adminActionController.tempBean.selectType}">
<f:selectItem itemLabel="Check" itemValue="Check" />
<f:selectItem itemLabel="Cash" itemValue="Cash"/>
<f:ajax event="change" listener="#{adminActionController.tempBean.changeType}"/>
</h:selectOneMenu>
And here is my bean code:
protected String selectType;
public String getSelectType() {
return selectType;
}
public void setSelectType(String selectType) {
this.selectType = selectType;
}
I tried a lot of ways, but something is still missing. I don't know what.
It sets h:inputText
values to bean, but I have a problem with dropdown values.
Can anybody help me?