I am trying to use <a4j:ajax>
to feed a method with a value just entered on the form;
<h:selectOneMenu id="aa" value="#{colorClass.color}">
<f:selectItems value="#{myChoices.colorOptions}"/>
<a4j:ajax event="change" render="colorCode"
execute="#{myChoices.getColorCode(colorClass,colorClass.color)}"/>
</selectOneMenu>
Color on the form is selected correctly;
my problem is that when I pass colorClass.color
as part of the execute, it is blank;
if I replace colorClass.color
with a literal
<a4j:ajax event="change" render="colorCode"
execute="#{myChoices.getColorCode(colorClass,'green')}"/>
the method is called, finds the colorCode and repaints the form
How can I "grab" the value just entered so that I can pass it as a parameter to the method?