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

📄 uidata.html

📁 j2ee帮助文档软件设计/软件工程 文件格式
💻 HTML
📖 第 1 页 / 共 5 页
字号:
</DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>var</CODE> - The new request-scope attribute name</DL></DD></DL><HR><A NAME="saveState(javax.faces.context.FacesContext)"><!-- --></A><H3>saveState</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>saveState</B>(<A HREF="../../../javax/faces/context/FacesContext.html" title="class in javax.faces.context">FacesContext</A>&nbsp;context)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../javax/faces/component/StateHolder.html#saveState(javax.faces.context.FacesContext)">StateHolder</A></CODE></B></DD><DD><p> Gets the state of the instance as a <code>Serializable</code> Object.<p> <p>If the class that implements this interface has references to instances that implement StateHolder (such as a <code>UIComponent</code> with event handlers, validators, etc.) this method must call the <A HREF="../../../javax/faces/component/StateHolder.html#saveState(javax.faces.context.FacesContext)"><CODE>StateHolder.saveState(javax.faces.context.FacesContext)</CODE></A> method on all those instances as well.  <strong>This method must not save the state of children and facets.</strong> That is done via the <A HREF="../../../javax/faces/application/StateManager.html" title="class in javax.faces.application"><CODE>StateManager</CODE></A></p> <p>This method must not alter the state of the implementing object.  In other words, after executing this code:</p> <code><pre> Object state = component.saveState(facesContext); </pre></code> <p><code>component</code> should be the same as before executing it.</p> <p>The return from this method must be <code>Serializable</code></p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/faces/component/StateHolder.html#saveState(javax.faces.context.FacesContext)">saveState</A></CODE> in interface <CODE><A HREF="../../../javax/faces/component/StateHolder.html" title="interface in javax.faces.component">StateHolder</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/faces/component/UIComponentBase.html#saveState(javax.faces.context.FacesContext)">saveState</A></CODE> in class <CODE><A HREF="../../../javax/faces/component/UIComponentBase.html" title="class in javax.faces.component">UIComponentBase</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="restoreState(javax.faces.context.FacesContext, java.lang.Object)"><!-- --></A><H3>restoreState</H3><PRE>public void <B>restoreState</B>(<A HREF="../../../javax/faces/context/FacesContext.html" title="class in javax.faces.context">FacesContext</A>&nbsp;context,                         <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;state)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../javax/faces/component/StateHolder.html#restoreState(javax.faces.context.FacesContext, java.lang.Object)">StateHolder</A></CODE></B></DD><DD><p> Perform any processing required to restore the state from the entries in the state Object.</p> <p>If the class that implements this interface has references to instances that also implement StateHolder (such as a <code>UIComponent</code> with event handlers, validators, etc.) this method must call the <A HREF="../../../javax/faces/component/StateHolder.html#restoreState(javax.faces.context.FacesContext, java.lang.Object)"><CODE>StateHolder.restoreState(javax.faces.context.FacesContext, java.lang.Object)</CODE></A> method on all those instances as well. </p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/faces/component/StateHolder.html#restoreState(javax.faces.context.FacesContext, java.lang.Object)">restoreState</A></CODE> in interface <CODE><A HREF="../../../javax/faces/component/StateHolder.html" title="interface in javax.faces.component">StateHolder</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/faces/component/UIComponentBase.html#restoreState(javax.faces.context.FacesContext, java.lang.Object)">restoreState</A></CODE> in class <CODE><A HREF="../../../javax/faces/component/UIComponentBase.html" title="class in javax.faces.component">UIComponentBase</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getValue()"><!-- --></A><H3>getValue</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getValue</B>()</PRE><DL><DD><p>Return the value of the UIData.  This value must either be  be of type <A HREF="../../../javax/faces/model/DataModel.html" title="class in javax.faces.model"><CODE>DataModel</CODE></A>, or a type that can be adapted into a <A HREF="../../../javax/faces/model/DataModel.html" title="class in javax.faces.model"><CODE>DataModel</CODE></A>.  <code>UIData</code> will automatically adapt the following types:</p> <ul> <li>Arrays</li> <li><code>java.util.List</code></li> <li><code>java.sql.ResultSet</code></li> <li><code>javax.servlet.jsp.jstl.sql.Result</code></li> </ul> <p>All other types will be adapted using the <A HREF="../../../javax/faces/model/ScalarDataModel.html" title="class in javax.faces.model"><CODE>ScalarDataModel</CODE></A> class, which will treat the object as a single row of data.</p><P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="setValue(java.lang.Object)"><!-- --></A><H3>setValue</H3><PRE>public void <B>setValue</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;value)</PRE><DL><DD><p>Set the value of the <code>UIData</code>.  This value must either be  be of type <A HREF="../../../javax/faces/model/DataModel.html" title="class in javax.faces.model"><CODE>DataModel</CODE></A>, or a type that can be adapted into a <A HREF="../../../javax/faces/model/DataModel.html" title="class in javax.faces.model"><CODE>DataModel</CODE></A>.</p><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>value</CODE> - the new value</DL></DD></DL><HR><A NAME="setValueBinding(java.lang.String, javax.faces.el.ValueBinding)"><!-- --></A><H3>setValueBinding</H3><PRE>public 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/UIData.html#setValueExpression(java.lang.String, javax.el.ValueExpression)"><CODE>setValueExpression(java.lang.String, javax.el.ValueExpression)</CODE></A>.</I><P><DD><p>If "name" is something other than "value", "var", or "rowIndex", rely on the superclass conversion from <code>ValueBinding</code> to <code>ValueExpression</code>.</p><P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/faces/component/UIComponentBase.html#setValueBinding(java.lang.String, javax.faces.el.ValueBinding)">setValueBinding</A></CODE> in class <CODE><A HREF="../../../javax/faces/component/UIComponentBase.html" title="class in javax.faces.component">UIComponentBase</A></CODE></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>, <code>parent</code>, <code>var</code>, or  <code>rowIndex</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="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.  In addition, if a <A HREF="../../../javax/el/ValueExpression.html" title="class in javax.el"><CODE>ValueExpression</CODE></A> is set for the <code>value</code> property, remove any synthesized <A HREF="../../../javax/faces/model/DataModel.html" title="class in javax.faces.model"><CODE>DataModel</CODE></A> for the data previously bound to this component.</p><P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/faces/component/UIComponent.html#setValueExpression(java.lang.String, javax.el.ValueExpression)">setValueExpression</A></CODE> in class <CODE><A HREF="../../../javax/faces/component/UIComponent.html" title="class in javax.faces.component">UIComponent</A></CODE></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>, <code>parent</code>, <code>var</code>, or  <code>rowIndex</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 <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 identifier for this component that includes the current value of the <code>rowIndex</code> property, if it is not set to -1.  This implies that multiple calls to <code>getClientId()</code> may return different results, but ensures that child components can themselves generate row-specific client identifiers (since <A HREF="../../../javax/faces/component/UIData.html" title="class in javax.faces.component"><CODE>UIData</CODE></A> is a <A HREF="../../../javax/faces/component/NamingContainer.html" title="interface in javax.faces.component"><CODE>NamingContainer</CODE></A>).</p><P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/faces/component/UIComponentBase.html#getClientId(javax.faces.context.FacesContext)">getClientId</A></CODE> in class <CODE><A HREF="../../../javax/faces/component/UIComponentBase.html" title="class in javax.faces.component">UIComponentBase</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>context</CODE> - The <A HREF="../../../javax/faces/context/FacesContext.html" title="class in javax.faces.context"><CODE>FacesContext</CODE></A> for the current request<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>context</code>  is <code>null</code></DL></DD></DL><HR><A NAME="invokeOnComponent(javax.faces.context.FacesContext, java.lang.String, javax.faces.component.ContextCallback)"><!-- --></A><H3>invokeOnComponent</H3><PRE>public boolean <B>invokeOnComponent</B>(<A HREF="../../../javax/faces/context/FacesContext.html" title="class in javax.faces.context">FacesContext</A>&nbsp;context,                                 <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;clientId,                                 <A HREF="../../../javax/faces/component/ContextCallback.html" title="interface in javax.faces.component">ContextCallback</A>&nbsp;callback)                          throws <A HREF="../../../javax/faces/FacesException.html" title="class in javax.faces">FacesException</A></PRE><DL><DD><p>Override behavior from <A HREF="../../../javax/faces/component/UIComponentBase.html#invokeOnComponent(javax.faces.context.FacesContext, java.lang.String, javax.faces.component.ContextCallback)"><CODE>UIComponentBase.invokeOnComponent(javax.faces.context.FacesContext, java.lang.String, javax.faces.component.ContextCallback)</CODE></A> to provide special care for positioning the data properly before finding the component and invoking the callback on it.  If the argument <code>clientId</code> is equal to <code>this.getClientId()</code> simply invoke the <code>contextCallback</code>, passing the <code>context</code> argument and <b>this</b> as arguments, and return <code>true.</code> Otherwise, attempt to extract a rowIndex from the <code>clientId</code>.  For example, if the argument <code>clientId</code> was <code>form:data:3:customerHeader</code> the rowIndex would be <code>3</code>.  Let this value be called <code>newIndex</code>. The current rowIndex of this instance must be saved aside and restored before returning in all cases, regardless of the outcome of the search or if any exceptions are thrown in the process.</p>  <p>The implementation of this method must never return <code>true</code> if setting the rowIndex of this instance to be equal to <code>newIndex</code> causes this instance to return <code>false</code> from <A HREF="../../../javax/faces/component/UIData.html#isRowAvailable()"><CODE>isRowAvailable()</CODE></A>.</p><P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../..

⌨️ 快捷键说明

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