public abstract class AbstractFormTag extends HtmlEscapingAwareTag
TagWriter
にアクセスして操作するためのユーティリティメソッドを提供します。 サブクラスは、実際のタグレンダリングを実行するために writeTagContent(TagWriter)
を実装する必要があります。
サブクラス(またはテストクラス)は、createTagWriter()
メソッドをオーバーライドして、現在の PageContext
EE に関連付けられた JspWriter
EE 以外の Writer
SE に出力をリダイレクトできます。
logger, REQUEST_CONTEXT_PAGE_ATTRIBUTE
idEE, pageContextEE
EVAL_BODY_AGAINEE
EVAL_BODY_INCLUDEEE, EVAL_PAGEEE, SKIP_BODYEE, SKIP_PAGEEE
コンストラクターと説明 |
---|
AbstractFormTag() |
修飾子と型 | メソッドと説明 |
---|---|
protected TagWriter | createTagWriter() すべての出力が書き込まれる TagWriter を作成します。 |
protected int | doStartTagInternal() |
protected ObjectSE | evaluate(StringSE attributeName, ObjectSE value) 指定された属性名に対して指定された値を評価します。 |
protected StringSE | getDisplayString(ObjectSE value) 必要に応じてエスケープされた、指定された Object の表示値を取得します。 |
protected StringSE | getDisplayString(ObjectSE value, PropertyEditorSE propertyEditor) 必要に応じてエスケープされた、指定された Object の表示値を取得します。 |
protected boolean | isDefaultHtmlEscape() デフォルトが明示的に指定されていない場合は、デフォルトで true にオーバーライドされます。 |
protected void | writeOptionalAttribute(TagWriter tagWriter, StringSE attributeName, StringSE value) オプションで、指定された属性名に指定された値を指定された TagWriter に書き込みます。 |
protected abstract int | writeTagContent(TagWriter tagWriter) サブクラスはこのメソッドを実装して、タグコンテンツのレンダリングを実行する必要があります。 |
htmlEscape, isHtmlEscape, isResponseEncodedHtmlEscape, setHtmlEscape
doCatch, doFinally, doStartTag, getRequestContext
doAfterBodyEE, doEndTagEE, findAncestorWithClassEE, getIdEE, getParentEE, getValueEE, getValuesEE, releaseEE, removeValueEE, setIdEE, setPageContextEE, setParentEE, setValueEE
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
@Nullable protected ObjectSE evaluate(StringSE attributeName, @Nullable ObjectSE value) throws JspExceptionEE
デフォルトの実装は、指定された値をそのまま返すだけです。
protected final void writeOptionalAttribute(TagWriter tagWriter, StringSE attributeName, @Nullable StringSE value) throws JspExceptionEE
TagWriter
に書き込みます。この場合、指定された値は最初に evaluated
であり、次に String representation
が属性値として書き込まれます。結果の String
表現が null
または空の場合、属性は書き込まれません。protected TagWriter createTagWriter()
TagWriter
を作成します。デフォルトでは、TagWriter
は現在の PageContext
EE の出力を JspWriter
EE に書き込みます。サブクラスは、出力が実際に書き込まれる Writer
SE を変更することを選択できます。protected final int doStartTagInternal() throws ExceptionSE
RequestContextAwareTag
の doStartTagInternal
writeTagContent(TagWriter)
が返す値 ExceptionSE
- 例外、JspException 以外のチェックされたものは、doStartTag によって JspException にラップされます。TagSupport.doStartTag()
EEprotected StringSE getDisplayString(@Nullable ObjectSE value)
Object
の表示値を取得します。このバージョンは PropertyEditor
SE -aware ではありません。protected StringSE getDisplayString(@Nullable ObjectSE value, @Nullable PropertyEditorSE propertyEditor)
Object
の表示値を取得します。指定された値が String
SE ではなく、指定された PropertyEditor
SE が null でない場合、表示値を取得するために PropertyEditor
SE が使用されます。protected boolean isDefaultHtmlEscape()
true
にオーバーライドされます。HtmlEscapingAwareTag
の isDefaultHtmlEscape
RequestContextAwareTag.getRequestContext()
protected abstract int writeTagContent(TagWriter tagWriter) throws JspExceptionEE
Tag.doStartTag()
EE による有効なタグレンダリング命令。JspExceptionEE