org.apache.myfaces.taglib.core
Class ValueChangeListenerTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by org.apache.myfaces.taglib.core.GenericListenerTag<EditableValueHolder,ValueChangeListener>
          extended by org.apache.myfaces.taglib.core.ValueChangeListenerTag
All Implemented Interfaces:
Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

@JSFJspTag(name="f:valueChangeListener",
           bodyContent="empty")
public class ValueChangeListenerTag
extends GenericListenerTag<EditableValueHolder,ValueChangeListener>

Adds the specified ValueChangeListener to the nearest parent UIComponent (which is expected to be a UIInput component).

Whenever the form containing the parent UIComponent is submitted, an instance of the specified type is created. If the submitted value from the component is different from the component's current value then a ValueChangeEvent is queued. When the ValueChangeEvent is processed (at end of the validate phase for non-immediate components, or at end of the apply-request-values phase for immediate components) the object's processValueChange method is invoked.

Unless otherwise specified, all attributes accept static values or EL expressions.

Version:
$Revision: 1187701 $ $Date: 2011-10-22 07:21:54 -0500 (Sat, 22 Oct 2011) $
Author:
Manfred Geiler (latest modification by $Author: bommel $)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
ValueChangeListenerTag()
           
 
Method Summary
protected  void addListener(EditableValueHolder editableValueHolder, ValueChangeListener valueChangeListener)
           
protected  ValueChangeListener createDelegateListener(javax.el.ValueExpression type, javax.el.ValueExpression binding)
           
 void setBinding(javax.el.ValueExpression binding)
          Value binding expression that evaluates to an implementation of the javax.faces.event.ValueChangeListener interface.
 void setType(javax.el.ValueExpression type)
          The name of a Java class that implements ValueChangeListener.
 
Methods inherited from class org.apache.myfaces.taglib.core.GenericListenerTag
createListener, doStartTag, release
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueChangeListenerTag

public ValueChangeListenerTag()
Method Detail

addListener

protected void addListener(EditableValueHolder editableValueHolder,
                           ValueChangeListener valueChangeListener)
Specified by:
addListener in class GenericListenerTag<EditableValueHolder,ValueChangeListener>

createDelegateListener

protected ValueChangeListener createDelegateListener(javax.el.ValueExpression type,
                                                     javax.el.ValueExpression binding)
Specified by:
createDelegateListener in class GenericListenerTag<EditableValueHolder,ValueChangeListener>

setType

@JSFJspAttribute(className="javax.el.ValueExpression",
                 deferredValueType="java.lang.String")
public void setType(javax.el.ValueExpression type)
The name of a Java class that implements ValueChangeListener.

Overrides:
setType in class GenericListenerTag<EditableValueHolder,ValueChangeListener>

setBinding

@JSFJspAttribute(className="javax.el.ValueExpression",
                 deferredValueType="javax.faces.event.ValueChangeListener")
public void setBinding(javax.el.ValueExpression binding)
Value binding expression that evaluates to an implementation of the javax.faces.event.ValueChangeListener interface.

Overrides:
setBinding in class GenericListenerTag<EditableValueHolder,ValueChangeListener>


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.