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
ActionListenerinstance 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 intdoStartTag()Create a new instance of theActionListenerclass, and register it with theUIComponentinstance associated with our most immediately surroundingUIComponentClassicTagBaseinstance.voidrelease()Release references to any acquired resources.voidsetTarget(jakarta.el.ValueExpression target)Setter for the target attributevoidsetValue(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
ActionListenerclass, and register it with theUIComponentinstance associated with our most immediately surroundingUIComponentClassicTagBaseinstance. The behavior of theActionListenermust conform to the class description.- Specified by:
doStartTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doStartTagin 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:
releasein interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
releasein classjakarta.servlet.jsp.tagext.TagSupport
-