*/
public void apply(FaceletContext ctx, UIComponent parent)
throws IOException, FacesException, FaceletException, ELException {
if (parent instanceof EditableValueHolder) {
if (ComponentSupport.isNew(parent)) {
EditableValueHolder evh = (EditableValueHolder) parent;
ValueExpression b = null;
if (this.binding != null) {
b = this.binding.getValueExpression(ctx, ValueChangeListener.class);
}
ValueChangeListener listener = new LazyValueChangeListener(
this.listenerType, b);
evh.addValueChangeListener(listener);
}
} else {
throw new TagException(this.tag,
"Parent is not of type EditableValueHolder, type is: "
+ parent);