Class ConverterELTag
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- javax.faces.webapp.ConverterELTag
-
- All Implemented Interfaces:
java.io.Serializable,javax.servlet.jsp.tagext.IterationTag,javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.tagext.Tag
public abstract class ConverterELTag extends javax.servlet.jsp.tagext.TagSupportConverterELTag is a base class for all JSP custom actions that create and register a
Converterinstance on theValueHolderassociated with our most immediate surrounding instance of a tag whose implementation class is a subclass ofUIComponentClassicTagBase. To avoid creating duplicate instances when a page is redisplayed, creation and registration of aConverteroccurs only if the correspondingUIComponentwas created (by the owningUIComponentTag) during the execution of the current page.This class may be used as a base class for tag instances that support specific
Convertersubclasses.Subclasses of this class must implement the
createConverter()method, which creates and returns aConverterinstance. Any configuration properties that specify behavior of thisConvertermust have been set by thecreateConverter()method. Generally, this occurs by copying corresponding attribute values on the tag instance.This tag creates no output to the page currently being created. It is used solely for the side effect of
Convertercreation.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ConverterELTag()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract ConvertercreateConverter()Create and return a newConverterto be registered on our surroundingUIComponent.intdoStartTag()Create a new instance of the specifiedConverterclass, and register it with theUIComponentinstance associated with our most immediately surroundingUIComponentClassicTagBaseinstance, if theUIComponentinstance was created by this execution of the containing JSP page.
-
-
-
Method Detail
-
doStartTag
public int doStartTag() throws javax.servlet.jsp.JspExceptionCreate a new instance of the specified
Converterclass, and register it with theUIComponentinstance associated with our most immediately surroundingUIComponentClassicTagBaseinstance, if theUIComponentinstance was created by this execution of the containing JSP page. If the localValue of theUIComponentis a String, attempt to convert it.- Specified by:
doStartTagin interfacejavax.servlet.jsp.tagext.Tag- Overrides:
doStartTagin classjavax.servlet.jsp.tagext.TagSupport- Throws:
javax.servlet.jsp.JspException- if a JSP error occurs
-
createConverter
protected abstract Converter createConverter() throws javax.servlet.jsp.JspException
Create and return a new
Converterto be registered on our surroundingUIComponent.- Throws:
javax.servlet.jsp.JspException- if a new instance cannot be created
-
-