So I have the following code:
<h:inputText value = "#{listAllBookings.searchText}">
<f:ajax listener="#{listAllBookings.printValues()}" event="keyup" render="myTable"/>
</h:inputText>
<h:selectOneMenu value="#{listAllBookings.selectedAttr}">
<f:selectItem itemLabel="GUEST" itemValue="GUEST"/>
<f:selectItem itemLabel="HOTEL" itemValue="HOTEL"/>
</h:selectOneMenu>
And my printValues method:
public void printValues() {
System.out.println("searchText:" + searchText + " and selectedAttr: " + selectedAttr);
}
So as you can see the code above is pretty simple. The problem is that I can't change the value of the selectedAttr value. I already checked if I have the appropriate getter and setter methods. The value of the selectedAttr remains null, while the searchText value changes.
The current output looks like this: