UIComponentTag (Java EE 5)

Java EE API


javax.faces.webapp Class UIComponentTag

java.lang.Object
  extended by javax.faces.webapp.UIComponentTagBase
      extended by javax.faces.webapp.UIComponentClassicTagBase
          extended by javax.faces.webapp.UIComponentTag
All Implemented Interfaces:
BodyTag, IterationTag, JspIdConsumer, JspTag, Tag
Direct Known Subclasses:
UIComponentBodyTag

Deprecated. Use of this class has been replaced with UIComponentELTag, which extends UIComponentClassicTagBase to add properties that use the EL API introduced as part of JSP 2.1.

Implements: Tag
Extended by: UIComponentBodyTag

UIComponentTag 是所有满足以下条件的 JSP 自定义操作的基类:这些操作对应于 JavaServer Faces 所呈现的页面中的用户界面组件。

在此规范版本中,UIComponentTag 扩展了 UIComponentClassicTagBase,添加了使用 Faces 1.1 表达式语言的属性。

英文文档:

public abstract class UIComponentTag
extends UIComponentClassicTagBase
implements Tag

UIComponentTag is the base class for all JSP custom actions that correspond to user interface components in a page that is rendered by JavaServer Faces.

In this version of the specification, UIComponentTag extends UIComponentClassicTagBase to add properties that use the Faces 1.1 Expression Language.


Field Summary
 
Fields inherited from class javax.faces.webapp.UIComponentClassicTagBase
 
Fields inherited from class javax.faces.webapp.UIComponentTagBase
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
 
Constructor Summary
 
Method Summary
protected  UIComponent
static UIComponentTag
protected  boolean
protected  boolean
static boolean
 void
 void
protected  void
 void
 
Methods inherited from class javax.faces.webapp.UIComponentClassicTagBase
 
Methods inherited from class javax.faces.webapp.UIComponentTagBase
 
Methods inherited from class java.lang.Object
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
 

Constructor Detail

public UIComponentTag()
英文文档:

UIComponentTag

public UIComponentTag()
Deprecated. 
Method Detail

public void setBinding(String binding) throws JspException

设置组件的值绑定表达式。

binding 新的值绑定表达式
ThrowsIllegalArgumentException: 如果指定的绑定不是有效的值绑定表达式。
英文文档:

setBinding

public void setBinding(String binding)
                throws JspException
Deprecated. 

Set the value binding expression for our component.

Parameters:
binding - The new value binding expression
Throws:
IllegalArgumentException - if the specified binding is not a valid value binding expression.
JspException

protected boolean hasBinding()
英文文档:

hasBinding

protected boolean hasBinding()
Deprecated. 
Description copied from class: UIComponentClassicTagBase

Return true if this component has a non-null binding attribute. This method is necessary to allow subclasses that expose the binding property as an Faces 1.1 style EL property as well as subclasses that expose it as an EL API property.

Specified by:
hasBinding in class UIComponentClassicTagBase

public void setRendered(String rendered)

为呈现的属性设置重写。

rendered 呈现属性的新值
英文文档:

setRendered

public void setRendered(String rendered)
Deprecated. 

Set an override for the rendered attribute.

Parameters:
rendered - The new value for rendered attribute

protected boolean isSuppressed()
英文文档:

isSuppressed

protected boolean isSuppressed()
Deprecated. 

public static boolean isValueReference(String value)

如果指定的值符合值绑定表达式的语法要求,则返回 true。这些表达式 ` * 可以对大多数组件标记属性使用,表示希望对要在底层 UIComponent 上设置的属性值进行延迟求值。

value 要求值的值。
ThrowsNullPointerException: 如果 valuenull
英文文档:

isValueReference

public static boolean isValueReference(String value)
Deprecated. 

Return true if the specified value conforms to the syntax requirements of a value binding expression. Such expressions ` * may be used on most component tag attributes to signal a desire for deferred evaluation of the attribute or property value to be set on the underlying UIComponent.

Parameters:
value - The value to evaluate
Throws:
NullPointerException - if value is null

public void release()

释放执行此标记处理程序期间分配的所有资源。

英文文档:

release

public void release()
Deprecated. 

Release any resources allocated during the execution of this tag handler.

Specified by:
release in interface Tag
Overrides:
release in class UIComponentClassicTagBase

protected void setProperties(UIComponent component)
component NullPointerException 要重写属性的 UIComponent
英文文档:

setProperties

protected void setProperties(UIComponent component)
Deprecated. 
Description copied from class: UIComponentClassicTagBase

Override properties and attributes of the specified component, if the corresponding properties of this tag handler instance were explicitly set. This method must be called ONLY if the specified UIComponent was in fact created during the execution of this tag handler instance, and this call will occur BEFORE the UIComponent is added to the view.

Tag subclasses that want to support additional set properties must ensure that the base class setProperties() method is still called. A typical implementation that supports extra properties foo and bar would look something like this:

 protected void setProperties(UIComponent component) {
   super.setProperties(component);
   if (foo != null) {
     component.setAttribute("foo", foo);
   }
   if (bar != null) {
     component.setAttribute("bar", bar);
   }
 }
 

The default implementation overrides the following properties:

  • rendered - Set if a value for the rendered property is specified for this tag handler instance.
  • rendererType - Set if the getRendererType() method returns a non-null value.

Specified by:
setProperties in class UIComponentClassicTagBase
Parameters:
component - UIComponent whose properties are to be overridden

protected UIComponent createComponent(FacesContext context, String newId)

使用 Faces 1.1 EL API 实现 createComponent

context NullPointerException 当前请求的 FacesContext
newId NullPointerException 当前请求的 FacesContext
英文文档:

createComponent

protected UIComponent createComponent(FacesContext context,
                                      String newId)
Deprecated. 

Implement createComponent using Faces 1.1 EL API.

Specified by:
createComponent in class UIComponentClassicTagBase
Parameters:
context - FacesContext for the current request
newId - id of the component

public static UIComponentTag getParentUIComponentTag(PageContext context)

查找并返回最新封装的 UIComponentTag(如果有);否则返回 null

context 当前页面的 PageContext
英文文档:

getParentUIComponentTag

public static UIComponentTag getParentUIComponentTag(PageContext context)
Deprecated. 

Locate and return the nearest enclosing UIComponentTag if any; otherwise, return null.

Parameters:
context - PageContext for the current page


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!