public abstract class UIComponentELTag extends UIComponentClassicTagBase implements Tag
UIComponentELTag
はそのスーパークラスを特殊化して、Jakarta Expression Language 式から値を取得するプロパティを許可します。
このタグは、Faces バージョン 1.2 および Jakarta Server Pages バージョン 2.1 コンテナーで使用するために設計されています。
bodyContent, pageContext, UNIQUE_ID_PREFIX
log
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
EVAL_BODY_AGAIN
コンストラクターと説明 |
---|
UIComponentELTag() |
修飾子と型 | メソッドと説明 |
---|---|
protected UIComponent | createComponent(FacesContext context, StringSE newId) getComponentType() を呼び出して返される型の新しい子コンポーネントを作成して返します。 |
protected ELContext | getELContext() このリクエストの FacesContext の ELContext を返します。 |
protected boolean | hasBinding() このコンポーネントに null 以外のバインディング属性がある場合、true を返します。 |
void | release() このタグハンドラーの実行中に割り当てられたリソースを解放します。 |
void | setBinding(ValueExpression binding) コンポーネントの値式を設定します。 |
protected void | setProperties(UIComponent component) このタグハンドラーインスタンスの対応するプロパティが明示的に設定されている場合、指定されたコンポーネントのプロパティと属性をオーバーライドします。 |
void | setRendered(ValueExpression rendered) レンダリングされた属性のオーバーライドを設定します。 |
addChild, addFacet, addVerbatimAfterComponent, addVerbatimBeforeComponent, createVerbatimComponent, createVerbatimComponentFromBodyContent, doAfterBody, doEndTag, doInitBody, doStartTag, encodeBegin, encodeChildren, encodeEnd, findComponent, getBodyContent, getComponentInstance, getCreated, getCreatedComponents, getDoAfterBodyValue, getDoEndValue, getDoStartValue, getFacesContext, getFacesJspId, getFacetName, getId, getIndexOfNextChildTag, getJspId, getParent, getParentUIComponentClassicTagBase, getPreviousOut, setBodyContent, setId, setJspId, setPageContext, setParent, setupResponseWriter
getComponentType, getRendererType
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
doEndTag, doStartTag, getParent, setPageContext, setParent
public void setBinding(ValueExpression binding) throws JspException
コンポーネントの値式を設定します。
binding
- 新しい値式 JspException
- エラーが発生した場合 protected boolean hasBinding()
UIComponentClassicTagBase
このコンポーネントに非 null
バインディング属性がある場合、true
を返します。このメソッドは、binding
プロパティを Faces 1.1 スタイルの式言語プロパティとして公開するサブクラスと、Jakarta Expression Language API プロパティとして公開するサブクラスを許可するために必要です。
UIComponentClassicTagBase
の hasBinding
public void setRendered(ValueExpression rendered)
レンダリングされた属性のオーバーライドを設定します。
rendered
- レンダリングされた属性の新しい値 protected ELContext getELContext()
このリクエストの FacesContext
の ELContext
を返します。
これは getFacesContext().getELContext()
にとって便利です。
UIComponentTagBase
の getELContext
FacesContext
の {code ELContext} public void release()
このタグハンドラーの実行中に割り当てられたリソースを解放します。
Tag
の release
UIComponentClassicTagBase
の release
protected void setProperties(UIComponent component)
このタグハンドラーインスタンスの対応するプロパティが明示的に設定されている場合、指定されたコンポーネントのプロパティと属性をオーバーライドします。このメソッドは、指定された UIComponent
がこのタグハンドラーインスタンスの実行中に実際に作成された場合にのみ呼び出す必要があり、この呼び出しは UIComponent
がビューに追加される前に発生します。
追加のセットプロパティをサポートするタグサブクラスは、ベースクラス setProperties()
メソッドが引き続き呼び出されることを確認する必要があります。追加のプロパティ foo
および bar
をサポートする典型的な実装は、次のようになります。
protected void setProperties(UIComponent component) { super.setProperties(component); if (foo != null) { component.setAttribute("foo", foo); } if (bar != null) { component.setAttribute("bar", bar); } }
デフォルトの実装は、次のプロパティをオーバーライドします。
rendered
- このタグハンドラーインスタンスに rendered
プロパティの値が指定されている場合に設定します。rendererType
- getRendererType()
メソッドが null 以外の値を返す場合に設定します。UIComponentClassicTagBase
の setProperties
component
- プロパティがオーバーライドされる UIComponent
protected UIComponent createComponent(FacesContext context, StringSE newId) throws JspException
getComponentType()
を呼び出して返される型の新しい子コンポーネントを作成して返します。この UIComponentELTag
に null 以外の binding
属性がある場合、これは binding
属性用に作成された ValueExpression
を使用して Application.createComponent(java.lang.String)
を呼び出して行われ、ValueExpression
はコンポーネントに保管されます。それ以外の場合、Application.createComponent(java.lang.String)
はコンポーネント型のみで呼び出されます。最後に、コンポーネント ID およびその他のプロパティを初期化します。
UIComponentClassicTagBase
の createComponent
context
- 現在のリクエストの FacesContext
newId
- コンポーネントの IDJspException
- コンポーネントを作成できない場合 Copyright © 2018,2020 Eclipse Foundation.
Use is subject to license terms.