Optional valueChangeListener for h:selectonemenu
Here is an implementation of the needed tag handler: public final class ValueChangeListenerHandler extends TagHandler { private final static Class[] VALUECHANGE_SIG = new Class[] {ValueChangeEvent.class}; private final TagAttribute value; public ValueChangeListenerHandler(TagConfig config) { super(config); value = this.getRequiredAttribute("value"); } /* * (non-Javadoc) * * @see com.sun.facelets.FaceletHandler#apply(com.sun.facelets.FaceletContext, * javax.faces.component.UIComponent) */ public void apply(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, ELException { if (parent instanceof EditableValueHolder) { if (ComponentSupport.isNew(parent)) { ((EditableValueHolder) parent).addValueChangeListener(new MethodExpressionValueChangeListener( value.getMethodExpression(ctx, null, VALUECHANGE_SIG))); } } else { throw new TagException(this.tag, "Parent is not of type EditableVa...