クラス AbstractDataBoundFormElementTag

実装されたすべてのインターフェース:
IterationTagEEJspTagEETagEETryCatchFinallyEESerializableSEEditorAwareTag
既知の直属サブクラス
AbstractHtmlElementTag

public abstract class AbstractDataBoundFormElementTag extends AbstractFormTag implements EditorAwareTag
すべてのデータバインディング対応 JSP フォームタグのベースタグ。

共通の path および id プロパティを提供します。サブクラスに、バインドされた値の BindStatus にアクセスするためのユーティリティメソッドと、TagWriter を使用する interacting にアクセスするためのユーティリティメソッドを提供します。

導入:
2.0
作成者:
Rob Harrop, Juergen Hoeller
関連事項:
  • フィールドの詳細

  • コンストラクターの詳細

    • AbstractDataBoundFormElementTag

      public AbstractDataBoundFormElementTag()
  • メソッドの詳細

    • setPath

      public void setPath(StringSE path)
      form object からプロパティパスを設定します。ランタイム式の場合があります。
    • getPath

      protected final StringSE getPath() throws JspExceptionEE
      form objectresolved プロパティパスを取得します。
      例外:
      JspExceptionEE
    • setId

      public void setId(@Nullable StringSE id)
      'id' 属性の値を設定します。

      ランタイム式の場合があります。デフォルトは getName() の値です。一部のタグではデフォルト値が有効でない場合があることに注意してください。

      オーバーライド:
      クラス TagSupportEEsetIdEE 
    • getId

      @Nullable public StringSE getId()
      'id' 属性の値を取得します。
      オーバーライド:
      クラス TagSupportEEgetIdEE 
    • writeDefaultAttributes

      protected void writeDefaultAttributes(TagWriter tagWriter) throws JspExceptionEE
      指定された TagWriter にデフォルトの属性セットを書き込みます。さらに、抽象サブクラスはこのメソッドをオーバーライドして追加のデフォルト属性を追加する必要がありますが、super メソッドを呼び出すことを忘れないでください。

      具象サブクラスは、デフォルトの属性をレンダリングする場合に、このメソッドを呼び出す必要があります。

      パラメーター:
      tagWriter - 属性が書き込まれる TagWriter
      例外:
      JspExceptionEE
    • resolveId

      @Nullable protected StringSE resolveId() throws JspExceptionEE
      このタグの 'id' 属性値を決定し、何も指定されていない場合は自動生成します。
      例外:
      JspExceptionEE
      関連事項:
    • autogenerateId

      @Nullable protected StringSE autogenerateId() throws JspExceptionEE
      このタグの 'id' 属性値を自動生成します。

      デフォルトの実装は単に getName() に委譲し、無効な文字("[" や "]" など)を削除します。

      例外:
      JspExceptionEE
    • getName

      @Nullable protected StringSE getName() throws JspExceptionEE
      HTML 'name' 属性の値を取得します。

      デフォルトの実装では、getPropertyPath() に委譲するだけで、プロパティパスを名前として使用します。データバインディングに対するサーバー側の期待とリンクしているため、ほとんどの場合、これは望ましいことです。ただし、一部のサブクラスは、バインドパスを変更せずに 'name' 属性の値を変更することを望む場合があります。

      戻り値:
      HTML 'name' 属性の値
      例外:
      JspExceptionEE
    • getBindStatus

      protected BindStatus getBindStatus() throws JspExceptionEE
      このタグの BindStatus を取得します。
      例外:
      JspExceptionEE
    • getNestedPath

      @Nullable protected StringSE getNestedPath()
      NestedPathTag によって公開された可能性のあるネストされたパスの値を取得します。
    • getPropertyPath

      protected StringSE getPropertyPath() throws JspExceptionEE
      ネストされたパスを含み、フォーム属性の名前が前に付いていない、このタグのプロパティパスを作成します。
      例外:
      JspExceptionEE
      関連事項:
    • getBoundValue

      @Nullable protected final ObjectSE getBoundValue() throws JspExceptionEE
      バインドされた値を取得します。
      例外:
      JspExceptionEE
      関連事項:
    • getPropertyEditor

      @Nullable protected PropertyEditorSE getPropertyEditor() throws JspExceptionEE
      このタグにバインドされた値に使用されている PropertyEditorSE がある場合は、それを取得します。
      例外:
      JspExceptionEE
    • getEditor

      @Nullable public final PropertyEditorSE getEditor() throws JspExceptionEE
      EditorAwareTagPropertyEditorSE を公開します。

      内部レンダリングのために getPropertyEditor() を使用します。

      次で指定:
      インターフェース EditorAwareTaggetEditor 
      戻り値:
      現在の PropertyEditor、または存在しない場合は null 
      例外:
      JspExceptionEE - エディターの解決に失敗した場合
    • convertToDisplayString

      protected StringSE convertToDisplayString(@Nullable ObjectSE value) throws JspExceptionEE
      BindStatus が値のクラスに登録した可能性がある PropertyEditor によって変換された、指定された値の表示文字列を取得します。
      例外:
      JspExceptionEE
    • processFieldValue

      protected final StringSE processFieldValue(@Nullable StringSE name, StringSE value, StringSE type)
      設定されているか、同じ値を返す場合は、RequestDataValueProcessor インスタンスを介して指定されたフォームフィールドを処理します。
    • doFinally

      public void doFinally()
      BindStatus インスタンスを破棄します。
      次で指定:
      インターフェース TryCatchFinallyEEdoFinallyEE 
      オーバーライド:
      クラス RequestContextAwareTagdoFinally