⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uicomponent.html

📁 j2ee帮助文档软件设计/软件工程 文件格式
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="UIComponent()"><!-- --></A><H3>UIComponent</H3><PRE>public <B>UIComponent</B>()</PRE><DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="getAttributes()"><!-- --></A><H3>getAttributes</H3><PRE>public abstract <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A>&lt;<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&gt; <B>getAttributes</B>()</PRE><DL><DD><p>Return a mutable <code>Map</code> representing the attributes (and properties, see below) associated wth this <A HREF="../../../javax/faces/component/UIComponent.html" title="class in javax.faces.component"><CODE>UIComponent</CODE></A>, keyed by attribute name (which must be a String).  The returned implementation must support all of the standard and optional <code>Map</code> methods, plus support the following additional requirements:</p> <ul> <li>The <code>Map</code> implementation must implement     the <code>java.io.Serializable</code> interface.</li> <li>Any attempt to add a <code>null</code> key or value must     throw a <code>NullPointerException</code>.</li> <li>Any attempt to add a key that is not a String must throw     a <code>ClassCastException</code>.</li> <li>If the attribute name specified as a key matches a property     of this <A HREF="../../../javax/faces/component/UIComponent.html" title="class in javax.faces.component"><CODE>UIComponent</CODE></A>'s implementation class, the following     methods will have special behavior:     <ul>     <li><code>containsKey</code> - Return <code>false</code>.</li>     <li><code>get()</code> - If the property is readable, call         the getter method and return the returned value (wrapping         primitive values in their corresponding wrapper classes);         otherwise throw <code>IllegalArgumentException</code>.</li>     <li><code>put()</code> - If the property is writeable, call         the setter method to set the corresponding value (unwrapping         primitive values in their corresponding wrapper classes).         If the property is not writeable, or an attempt is made to         set a property of primitive type to <code>null</code>,         throw <code>IllegalArgumentException</code>.</li>     <li><code>remove</code> - Throw         <code>IllegalArgumentException</code>.</li>     </ul></li> </ul><P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getValueBinding(java.lang.String)"><!-- --></A><H3>getValueBinding</H3><PRE>public abstract <A HREF="../../../javax/faces/el/ValueBinding.html" title="class in javax.faces.el">ValueBinding</A> <B>getValueBinding</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;name)</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>This has been replaced by <A HREF="../../../javax/faces/component/UIComponent.html#getValueExpression(java.lang.String)"><CODE>getValueExpression(java.lang.String)</CODE></A>.</I><P><DD><p>Call through to <A HREF="../../../javax/faces/component/UIComponent.html#getValueExpression(java.lang.String)"><CODE>getValueExpression(java.lang.String)</CODE></A> and examine the result.  If the result is an instance of the wrapper class mandated in <A HREF="../../../javax/faces/component/UIComponent.html#setValueBinding(java.lang.String, javax.faces.el.ValueBinding)"><CODE>setValueBinding(java.lang.String, javax.faces.el.ValueBinding)</CODE></A>, extract the <code>ValueBinding</code> instance and return it.  Otherwise, wrap the result in an implementation of <code>ValueBinding</code>, and return it.</p><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - Name of the attribute or property for which to retrieve a  <A HREF="../../../javax/faces/el/ValueBinding.html" title="class in javax.faces.el"><CODE>ValueBinding</CODE></A><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if <code>name</code>  is <code>null</code></DL></DD></DL><HR><A NAME="setValueBinding(java.lang.String, javax.faces.el.ValueBinding)"><!-- --></A><H3>setValueBinding</H3><PRE>public abstract void <B>setValueBinding</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;name,                                     <A HREF="../../../javax/faces/el/ValueBinding.html" title="class in javax.faces.el">ValueBinding</A>&nbsp;binding)</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>This has been replaced by <A HREF="../../../javax/faces/component/UIComponent.html#setValueExpression(java.lang.String, javax.el.ValueExpression)"><CODE>setValueExpression(java.lang.String, javax.el.ValueExpression)</CODE></A>.</I><P><DD><p>Wrap the argument <code>binding</code> in an implementation of <A HREF="../../../javax/el/ValueExpression.html" title="class in javax.el"><CODE>ValueExpression</CODE></A> and call through to <A HREF="../../../javax/faces/component/UIComponent.html#setValueExpression(java.lang.String, javax.el.ValueExpression)"><CODE>setValueExpression(java.lang.String, javax.el.ValueExpression)</CODE></A>.</p><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - Name of the attribute or property for which to set a  <A HREF="../../../javax/faces/el/ValueBinding.html" title="class in javax.faces.el"><CODE>ValueBinding</CODE></A><DD><CODE>binding</CODE> - The <A HREF="../../../javax/faces/el/ValueBinding.html" title="class in javax.faces.el"><CODE>ValueBinding</CODE></A> to set, or <code>null</code>  to remove any currently set <A HREF="../../../javax/faces/el/ValueBinding.html" title="class in javax.faces.el"><CODE>ValueBinding</CODE></A><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if <code>name</code> is one of  <code>id</code> or <code>parent</code><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if <code>name</code>  is <code>null</code></DL></DD></DL><HR><A NAME="getValueExpression(java.lang.String)"><!-- --></A><H3>getValueExpression</H3><PRE>public <A HREF="../../../javax/el/ValueExpression.html" title="class in javax.el">ValueExpression</A> <B>getValueExpression</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;name)</PRE><DL><DD><p>Return the <A HREF="../../../javax/el/ValueExpression.html" title="class in javax.el"><CODE>ValueExpression</CODE></A> used to calculate the value for the specified attribute or property name, if any.</p> <p>This method must be overridden and implemented for components that  comply with JSF 1.2 and later.</p><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - Name of the attribute or property for which to retrieve a  <A HREF="../../../javax/el/ValueExpression.html" title="class in javax.el"><CODE>ValueExpression</CODE></A><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if <code>name</code>  is <code>null</code><DT><B>Since:</B></DT>  <DD>1.2</DD></DL></DD></DL><HR><A NAME="setValueExpression(java.lang.String, javax.el.ValueExpression)"><!-- --></A><H3>setValueExpression</H3><PRE>public void <B>setValueExpression</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;name,                               <A HREF="../../../javax/el/ValueExpression.html" title="class in javax.el">ValueExpression</A>&nbsp;binding)</PRE><DL><DD><p>Set the <A HREF="../../../javax/el/ValueExpression.html" title="class in javax.el"><CODE>ValueExpression</CODE></A> used to calculate the value for the specified attribute or property name, if any.</p> <p>The implementation must call <A HREF="../../../javax/el/Expression.html#isLiteralText()"><CODE>Expression.isLiteralText()</CODE></A> on the argument <code>expression</code>.  If <code>isLiteralText()</code> returns <code>true</code>, invoke <A HREF="../../../javax/el/ValueExpression.html#getValue(javax.el.ELContext)"><CODE>ValueExpression.getValue(javax.el.ELContext)</CODE></A> on the argument expression and pass the result as the <code>value</code> parameter in a call to <code>this.<A HREF="../../../javax/faces/component/UIComponent.html#getAttributes()"><CODE>getAttributes()</CODE></A>.put(name, value)</code> where <code>name</code> is the argument <code>name</code>.  If an exception is thrown as a result of calling <A HREF="../../../javax/el/ValueExpression.html#getValue(javax.el.ELContext)"><CODE>ValueExpression.getValue(javax.el.ELContext)</CODE></A>, wrap it in a <A HREF="../../../javax/faces/FacesException.html" title="class in javax.faces"><CODE>FacesException</CODE></A> and re-throw it.  If <code>isLiteralText()</code> returns <code>false</code>, simply store the un-evaluated <code>expression</code> argument in the collection of <code>ValueExpression</code>s under the key given by the argument <code>name</code>.</p> <p>This method must be overridden and implemented for components that  comply with JSF 1.2 and later.</p><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - Name of the attribute or property for which to set a  <A HREF="../../../javax/el/ValueExpression.html" title="class in javax.el"><CODE>ValueExpression</CODE></A><DD><CODE>binding</CODE> - The <A HREF="../../../javax/el/ValueExpression.html" title="class in javax.el"><CODE>ValueExpression</CODE></A> to set, or <code>null</code>  to remove any currently set <A HREF="../../../javax/el/ValueExpression.html" title="class in javax.el"><CODE>ValueExpression</CODE></A><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if <code>name</code> is one of  <code>id</code> or <code>parent</code><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if <code>name</code>  is <code>null</code><DT><B>Since:</B></DT>  <DD>1.2</DD></DL></DD></DL><HR><A NAME="getClientId(javax.faces.context.FacesContext)"><!-- --></A><H3>getClientId</H3><PRE>public abstract <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getClientId</B>(<A HREF="../../../javax/faces/context/FacesContext.html" title="class in javax.faces.context">FacesContext</A>&nbsp;context)</PRE><DL><DD><p>Return a client-side identifier for this component, generating one if necessary.  The associated <A HREF="../../../javax/faces/render/Renderer.html" title="class in javax.faces.render"><CODE>Renderer</CODE></A>, if any, will be asked to convert the clientId to a form suitable for transmission to the client.</p>  <p>The return from this method must be the same value throughout the lifetime of the instance, unless the <code>id</code> property of the component is changed, or the component is placed in

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -