Class SetPropertyActionListenerTag

java.lang.Object
jakarta.servlet.jsp.tagext.TagSupport
com.sun.faces.taglib.jsf_core.SetPropertyActionListenerTag
All Implemented Interfaces:
jakarta.servlet.jsp.tagext.IterationTag, jakarta.servlet.jsp.tagext.JspTag, jakarta.servlet.jsp.tagext.Tag, Serializable

public class SetPropertyActionListenerTag
extends jakarta.servlet.jsp.tagext.TagSupport

Tag implementation that creates a special ActionListener instance and registers it on the ActionSource associated with our most immediate surrounding instance of a tag whose implementation class is a subclass of UIComponentClassicTagBase. This tag creates no output to the page currently being created.

The ActionListener instance created and installed by this tag has the following behavior and contract.

  • Only create and register the ActionListener instance the first time the component for this tag is created
  • The "target" and "value" tag attributes are ValueExpression instances and are stored unevaluated as instance variables of the listener.
  • When the listener executes, call getValue() on the "value" ValueExpression. Pass the result to a call to setValue() on the "target" ValueExpression

This tag creates no output to the page currently being created. It is used solely for the side effect of ActionListener creation.

See Also:
Serialized Form
  • Field Summary

    Fields inherited from class jakarta.servlet.jsp.tagext.TagSupport

    id, pageContext

    Fields inherited from interface jakarta.servlet.jsp.tagext.IterationTag

    EVAL_BODY_AGAIN

    Fields inherited from interface jakarta.servlet.jsp.tagext.Tag

    EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
  • Constructor Summary

    Constructors 
    Constructor Description
    SetPropertyActionListenerTag()  
  • Method Summary

    Modifier and Type Method Description
    int doStartTag()
    Create a new instance of the ActionListener class, and register it with the UIComponent instance associated with our most immediately surrounding UIComponentClassicTagBase instance.
    void release()
    Release references to any acquired resources.
    void setTarget​(jakarta.el.ValueExpression target)
    Setter for the target attribute
    void setValue​(jakarta.el.ValueExpression value)  

    Methods inherited from class jakarta.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 Details

  • Method Details

    • setTarget

      public void setTarget​(jakarta.el.ValueExpression target)

      Setter for the target attribute

      Parameters:
      target - The new class name
    • setValue

      public void setValue​(jakarta.el.ValueExpression value)
    • doStartTag

      public int doStartTag() throws jakarta.servlet.jsp.JspException

      Create a new instance of the ActionListener class, and register it with the UIComponent instance associated with our most immediately surrounding UIComponentClassicTagBase instance. The behavior of the ActionListener must conform to the class description.

      Specified by:
      doStartTag in interface jakarta.servlet.jsp.tagext.Tag
      Overrides:
      doStartTag in class jakarta.servlet.jsp.tagext.TagSupport
      Throws:
      jakarta.servlet.jsp.JspException - if a JSP error occurs
    • release

      public void release()

      Release references to any acquired resources.

      Specified by:
      release in interface jakarta.servlet.jsp.tagext.Tag
      Overrides:
      release in class jakarta.servlet.jsp.tagext.TagSupport