my selectonemenu does neither call the setter nor the getter after chosing an option. The map is displayed correctly in the dropdown.
Here is my code:
<p:selectOneMenu id="filter" value="#{myPatientsBean.selectedFilter}"
valueChangeListener="#{myPatientsBean.activateDefaultFilter}">
<f:selectItems value="#{myPatientsBean.defaultFilterEntries.entrySet()}" var="map" itemValue="#{map.value}" itemLabel="#{map.key}"/>
<p:ajax update="patientdata" event="change" />
</p:selectOneMenu>
and here is the backing Bean:
public Map<String, String> getDefaultFilterEntries() {
return getPatientForFilter().getDefaultFilterEntries(getCurrentUser().hasRight(UserRight.PATIENTVIEWALL));
}
public void setSelectedFilter(String index) {
selectedFilter = Integer.parseInt(index);
if (selectedFilter == -1) {
setUseDefaultFilter(false);
}
}
public String getSelectedFilterString() {
return Integer.toString(selectedFilter);
}
the ValueChangeListener is called too..
Would be very grateful for help. Tried almost everything :( A list doesn't solve my Problem neither.