I\'ve the below form:
First of all, the valueChangeListener
is the wrong tool for the job. Use
. Second, event="change"
is the wrong choice in case of checkboxes/radiobuttons because their physical value actually never changes. You should use event="click"
, but this is the default already, so you can just omit it.
All in all, the proper initial code should look like this:
with
public void onchangeEnabled(AjaxBehaviorEvent event) { // Note: event argument is optional.
// ...
}
Once fixed it like that, then you can easily make use of EL 2.2 capability to pass method arguments:
with
public void onchangeEnabled(Item item) {
// ...
}