previous | index | next

Adding Method Expressions to Components

Recall that the tag handler's setProperties method stores tag attribute values in its component.

Use this method to also add listeners represented by method expressions to the component:

public void setProperties(UIComponent component) {
   super.setProperties(component);
   ...
   if (valueChangeListener != null)
      ((EditableValueHolder) component).addValueChangeListener(
            new MethodExpressionValueChangeListener(valueChangeListener));
}
Other attributes besides valueChangeListener take method expressions for values. This table shows how to process them: Table 9-3.

previous | index | next