public class BindTag extends HtmlEscapingAwareTag implements EditorAwareTag
<bind>
タグは、特定の Bean または Bean プロパティのバインディングエラーの評価をサポートしています。型 BindStatus
の「ステータス」変数を Java 式と JSP EL 式の両方に公開します。モデル内の Bean または Bean プロパティにバインドするために使用できます。指定されたパスは、タグが Bean 自体のステータス(オブジェクトレベルエラーを表示)、特定の Bean プロパティ(フィールドエラーを表示)、または一致する Bean プロパティのセット(対応するすべてのフィールドエラーを表示)を公開するかどうかを決定します。
このタグを使用してバインドされた Errors
オブジェクトは、このエラーオブジェクトが適用される Bean プロパティと同様に、共同タグに公開されます。TransformTag
などのネストされたタグは、これらの公開されたプロパティにアクセスできます。
属性 | 必須 ? | ランタイム式? | 説明 |
---|---|---|---|
htmlEscape | false | true | このタグの HTML エスケープをブール値として設定します。現在のページのデフォルトの HTML エスケープ設定をオーバーライドします。 |
ignoreNestedPath | false | true | ネストされたパスがある場合、それを無視するかどうかを設定します。デフォルトでは無視しません。 |
path | true | true | ステータス情報をバインドする Bean または Bean プロパティへのパス。たとえば、account.name、company.address.zipCode、または単に従業員です。ステータスオブジェクトは、特にこの Bean または Bean プロパティのページスコープにエクスポートされます |
setPath(java.lang.String)
, 直列化された形式 修飾子と型 | フィールドと説明 |
---|---|
static StringSE | STATUS_VARIABLE_NAME このタグのスコープ内で公開されている変数の名前: "status"。 |
logger, REQUEST_CONTEXT_PAGE_ATTRIBUTE
idEE, pageContextEE
EVAL_BODY_AGAINEE
EVAL_BODY_INCLUDEEE, EVAL_PAGEEE, SKIP_BODYEE, SKIP_PAGEEE
コンストラクターと説明 |
---|
BindTag() |
修飾子と型 | メソッドと説明 |
---|---|
int | doEndTag() |
void | doFinally() |
protected int | doStartTagInternal() doStartTag によって呼び出され、実際の作業を実行します。 |
PropertyEditorSE | getEditor() このタグが現在バインドされているプロパティの PropertyEditor を取得します。 |
Errors | getErrors() このタグが現在バインドされているエラーインスタンスを取得します。 |
StringSE | getPath() このタグが適用されるパスを返します。 |
StringSE | getProperty() このタグが現在バインドされているプロパティ、または特定のプロパティではなくオブジェクトにバインドされている場合は null を取得します。 |
boolean | isIgnoreNestedPath() ネストされたパスがある場合、それを無視するかどうかを返します。 |
void | setIgnoreNestedPath(boolean ignoreNestedPath) ネストされたパスがある場合、それを無視するかどうかを設定します。 |
void | setPath(StringSE path) このタグが適用されるパスを設定します。 |
htmlEscape, isDefaultHtmlEscape, isHtmlEscape, isResponseEncodedHtmlEscape, setHtmlEscape
doCatch, doStartTag, getRequestContext
doAfterBodyEE, findAncestorWithClassEE, getIdEE, getParentEE, getValueEE, getValuesEE, releaseEE, removeValueEE, setIdEE, setPageContextEE, setParentEE, setValueEE
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public void setPath(StringSE path)
public StringSE getPath()
public void setIgnoreNestedPath(boolean ignoreNestedPath)
public boolean isIgnoreNestedPath()
protected final int doStartTagInternal() throws ExceptionSE
RequestContextAwareTag
RequestContextAwareTag
の doStartTagInternal
ExceptionSE
- 例外、JspException 以外のチェックされたものは、doStartTag によって JspException にラップされます。TagSupport.doStartTag()
EEpublic int doEndTag()
TagEE
の doEndTagEE
TagSupportEE
の doEndTagEE
@Nullable public final StringSE getProperty()
null
を取得します。連携するネストタグを対象としています。null
@Nullable public final Errors getErrors()
null
@Nullable public final PropertyEditorSE getEditor()
EditorAwareTag
EditorAwareTag
の getEditor
null
public void doFinally()
TryCatchFinallyEE
の doFinallyEE
RequestContextAwareTag
の doFinally