|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.faces.webapp Class UIComponentTagBase
java.lang.Object javax.faces.webapp.UIComponentTagBase
- All Implemented Interfaces:
- JspTag
- Direct Known Subclasses:
- UIComponentClassicTagBase
UIComponentTagBase
是所有满足以下条件的 JSP 标记的基类:这些标记对应于视图中的 javax.faces.component.UIComponent
实例。此基类允许在由 UIComponentELTag
和 UIComponentTag
实例组成的 JSP 页面中描述单个视图。
UIComponentTagBase
is the base class
for all JSP tags that correspond to a UIComponent
instance in the view. This base
class allows a single view to be described in a JSP page consisting
of both UIComponentELTag
and UIComponentTag
instances.
Field Summary | |
---|---|
protected static Logger |
log
|
Constructor Summary | |
---|---|
UIComponentTagBase()
|
Method Summary | |
---|---|
protected abstract void |
addChild(UIComponent child)
Add the component identifier of the specified UIComponent
to the list of component identifiers created or located by nested
UIComponentTag s processing this request. |
protected abstract void |
addFacet(String name)
Add the facet name of the specified facet to the list of facet names created or located by nested UIComponentTag s
processing this request. |
abstract UIComponent |
getComponentInstance()
Return the UIComponent instance that is associated with
this tag instance. |
abstract String |
getComponentType()
Return the component type for the component that is or will be bound to this tag. |
abstract boolean |
getCreated()
Return true if we dynamically created a new component
instance during execution of this tag. |
protected ELContext |
getELContext()
Return the ELContext for the FacesContext for
this request. |
protected abstract FacesContext |
getFacesContext()
Return the FacesContext instance for the current
request. |
protected abstract int |
getIndexOfNextChildTag()
Return the index of the next child to be added as a child of this tag. |
abstract String |
getRendererType()
Return the rendererType property that selects the
Renderer to be used for encoding this component, or
null to ask the component to render itself directly. |
abstract void |
setId(String id)
Set the component identifier for the component corresponding to this tag instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
英文文档:
log
protected static Logger log
Constructor Detail |
---|
public
UIComponentTagBase()
英文文档:
UIComponentTagBase
public UIComponentTagBase()
Method Detail |
---|
abstract protected FacesContext
getFacesContext()
返回当前请求的 FacesContext
实例。只有从每个标记实例的 doStartTag()
开始到 doEndTag()
结束时,此值才为非 null
。
getFacesContext
protected abstract FacesContext getFacesContext()
Return the
FacesContext
instance for the current request. This value will be non-null
only from the beginning ofdoStartTag()
through the end ofdoEndTag()
for each tag instance.
protected ELContext
getELContext()
返回此请求的 FacesContext
的 ELContext
。
这是 getFacesContext().getELContext()
的便捷方法。
getELContext
protected ELContext getELContext()
Return the
ELContext
for theFacesContext
for this request.This is a convenience for
getFacesContext().getELContext()
.
abstract protected void
addChild(UIComponent child)
将指定 UIComponent
的组件标识符添加到组件标识符列表,该列表是由处理此请求的嵌套 UIComponentTag
创建或找到的。
child | 应该添加标识符的新子组件 |
addChild
protected abstract void addChild(UIComponent child)
Add the component identifier of the specified
UIComponent
to the list of component identifiers created or located by nestedUIComponentTag
s processing this request.- Parameters:
child
- New child whose identifier should be added
abstract protected void
addFacet(String name)
将指定 facet 的 facet 名称添加到 facet 名称列表,该列表是由处理此请求的嵌套 UIComponentTag
创建或找到的。
name | 要添加的 Facet 名称 |
addFacet
protected abstract void addFacet(String name)
Add the facet name of the specified facet to the list of facet names created or located by nested
UIComponentTag
s processing this request.- Parameters:
name
- Facet name to be added
abstract public void
setId(String id)
设置此标记实例所对应组件的组件标识符。如果该参数以 javax.faces.component.UIViewRoot#UNIQUE_ID_PREFIX
开头,则抛出 IllegalArgumentException
id |
新的组件标识符。它可能不是以 javax.faces.component.UIViewRoot#UNIQUE_ID_PREFIX 开头。 |
Throws | IllegalArgumentException:
如果参数为非 null 并且以 javax.faces.component.UIViewRoot#UNIQUE_ID_PREFIX 开头。 |
setId
public abstract void setId(String id)
Set the component identifier for the component corresponding to this tag instance. If the argument begins with
UIViewRoot.UNIQUE_ID_PREFIX
throw anIllegalArgumentException
- Parameters:
id
- The new component identifier. This may not start withUIViewRoot.UNIQUE_ID_PREFIX
.- Throws:
IllegalArgumentException
- if the argument is non-null
and starts withUIViewRoot.UNIQUE_ID_PREFIX
.
abstract public String
getComponentType()
返回绑定或即将绑定到此标记的组件的组件类型。此值可以被传递给 javax.faces.application.Application#createComponent
,以便为此标记创建 UIComponent
实例。子类必须重写此方法,以返回相应的值。
getComponentType
public abstract String getComponentType()
Return the component type for the component that is or will be bound to this tag. This value can be passed to
Application.createComponent(java.lang.String)
to create theUIComponent
instance for this tag. Subclasses must override this method to return the appropriate value.
abstract public String
getRendererType()
返回 rendererType
属性,该属性选择用来编码此组件的 Renderer
;或者返回 null
,表示请求组件直接呈现自身。子类必须重写此方法,以返回相应的值。
getRendererType
public abstract String getRendererType()
Return the
rendererType
property that selects theRenderer
to be used for encoding this component, ornull
to ask the component to render itself directly. Subclasses must override this method to return the appropriate value.
abstract public UIComponent
getComponentInstance()
返回关联此标记实例的 UIComponent
实例。此方法设计用于嵌套在标记中的标记,仅在对此标记实例执行 doStartTag()
和 doEndTag()
期间返回有用的结果。
getComponentInstance
public abstract UIComponent getComponentInstance()
Return the
UIComponent
instance that is associated with this tag instance. This method is designed to be used by tags nested within this tag, and only returns useful results between the execution ofdoStartTag()
anddoEndTag()
on this tag instance.
abstract public boolean
getCreated()
如果执行此标记期间动态创建了新的组件,则返回 true
。此方法设计用于嵌套在标记中的标记,仅在对此标记实例执行 doStartTag()
和 doEndTag()
期间返回有用的结果。
getCreated
public abstract boolean getCreated()
Return
true
if we dynamically created a new component instance during execution of this tag. This method is designed to be used by tags nested within this tag, and only returns useful results between the execution ofdoStartTag()
anddoEndTag()
on this tag instance.
abstract protected int
getIndexOfNextChildTag()
返回下一个子标记的索引,它将添加为此标记的子标记。默认实现维护一个所建组件的列表,并返回该列表的大小。
getIndexOfNextChildTag
protected abstract int getIndexOfNextChildTag()
Return the index of the next child to be added as a child of this tag. The default implementation maintains a list of created components and returns the size of the list.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!