Class 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
-
Constructor Summary
Constructors Constructor Description SetPropertyActionListenerTag()
-
Method Summary
Modifier and Type Method Description int
doStartTag()
Create a new instance of theActionListener
class, and register it with theUIComponent
instance associated with our most immediately surroundingUIComponentClassicTagBase
instance.void
release()
Release references to any acquired resources.void
setTarget(jakarta.el.ValueExpression target)
Setter for the target attributevoid
setValue(jakarta.el.ValueExpression value)
-
Constructor Details
-
SetPropertyActionListenerTag
public SetPropertyActionListenerTag()
-
-
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.JspExceptionCreate a new instance of the
ActionListener
class, and register it with theUIComponent
instance associated with our most immediately surroundingUIComponentClassicTagBase
instance. The behavior of theActionListener
must conform to the class description.- Specified by:
doStartTag
in interfacejakarta.servlet.jsp.tagext.Tag
- Overrides:
doStartTag
in classjakarta.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 interfacejakarta.servlet.jsp.tagext.Tag
- Overrides:
release
in classjakarta.servlet.jsp.tagext.TagSupport
-