I have this:
<h:selectOneMenu id="facility" value="#{document.facility}">
<f:selectItem itemLabel="A" itemValue=""/>
<f:selectItem itemLabel="B" itemValue=""/>
<f:selectItems value="#{document.facilities}"/>
<p:ajax actionListener="#{document.test}" update="project" event="change"/>
</h:selectOneMenu>
document
is the managed bean, that has method getFacilities()
that return a list of items, let say C
, D
, F
. So the drop down list would be like:
A
B
C
D
F
If I click on B
, then the method test()
would get invoke. I log it. But if I click on the runtime generated data C
, D
, F
, then the method test()
did not invoke at all. How can I fix this?