📄 uidata.html
字号:
</DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>header</CODE> - the new header facet<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>header</code> is <code>null</code></DL></DD></DL><HR><A NAME="isRowAvailable()"><!-- --></A><H3>isRowAvailable</H3><PRE>public boolean <B>isRowAvailable</B>()</PRE><DL><DD><p>Return a flag indicating whether there is <code>rowData</code> available at the current <code>rowIndex</code>. If no <code>wrappedData</code> is available, return <code>false</code>.</p><P><DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/faces/FacesException.html" title="class in javax.faces">FacesException</A></CODE> - if an error occurs getting the row availability</DL></DD></DL><HR><A NAME="getRowCount()"><!-- --></A><H3>getRowCount</H3><PRE>public int <B>getRowCount</B>()</PRE><DL><DD><p>Return the number of rows in the underlying data model. If the number of available rows is unknown, return -1.</p><P><DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/faces/FacesException.html" title="class in javax.faces">FacesException</A></CODE> - if an error occurs getting the row count</DL></DD></DL><HR><A NAME="getRowData()"><!-- --></A><H3>getRowData</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>getRowData</B>()</PRE><DL><DD><p>Return the data object representing the data for the currently selected row index, if any.</p><P><DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/faces/FacesException.html" title="class in javax.faces">FacesException</A></CODE> - if an error occurs getting the row data<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 now row data is available at the currently specified row index</DL></DD></DL><HR><A NAME="getRowIndex()"><!-- --></A><H3>getRowIndex</H3><PRE>public int <B>getRowIndex</B>()</PRE><DL><DD><p>Return the zero-relative index of the currently selected row. If we are not currently positioned on a row, return -1. This property is <strong>not</strong> enabled for value binding expressions.</p><P><DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/faces/FacesException.html" title="class in javax.faces">FacesException</A></CODE> - if an error occurs getting the row index</DL></DD></DL><HR><A NAME="setRowIndex(int)"><!-- --></A><H3>setRowIndex</H3><PRE>public void <B>setRowIndex</B>(int rowIndex)</PRE><DL><DD><p>Set the zero relative index of the current row, or -1 to indicate that no row is currently selected, by implementing the following algorithm. It is possible to set the row index at a value for which the underlying data collection does not contain any row data. Therefore, callers may use the <code>isRowAvailable()</code> method to detect whether row data will be available for use by the <code>getRowData()</code> method.</p></p> <ul> <li>Save current state information for all descendant components (as described below). <li>Store the new row index, and pass it on to the <A HREF="../../../javax/faces/model/DataModel.html" title="class in javax.faces.model"><CODE>DataModel</CODE></A> associated with this <A HREF="../../../javax/faces/component/UIData.html" title="class in javax.faces.component"><CODE>UIData</CODE></A> instance.</li> <li>If the new <code>rowIndex</code> value is -1: <ul> <li>If the <code>var</code> property is not null, remove the corresponding request scope attribute (if any).</li> <li>Reset the state information for all descendant components (as described below).</li> </ul></li> <li>If the new <code>rowIndex</code> value is not -1: <ul> <li>If the <code>var</code> property is not null, call <code>getRowData()</code> and expose the resulting data object as a request scope attribute whose key is the <code>var</code> property value.</li> <li>Reset the state information for all descendant components (as described below). </ul></li> </ul> <p>To save current state information for all descendant components, <A HREF="../../../javax/faces/component/UIData.html" title="class in javax.faces.component"><CODE>UIData</CODE></A> must maintain per-row information for each descendant as follows:<p> <ul> <li>If the descendant is an instance of <code>EditableValueHolder</code>, save the state of its <code>localValue</code> property.</li> <li>If the descendant is an instance of <code>EditableValueHolder</code>, save the state of the <code>localValueSet</code> property.</li> <li>If the descendant is an instance of <code>EditableValueHolder</code>, save the state of the <code>valid</code> property.</li> <li>If the descendant is an instance of <code>EditableValueHolder</code>, save the state of the <code>submittedValue</code> property.</li> </ul> <p>To restore current state information for all descendant components, <A HREF="../../../javax/faces/component/UIData.html" title="class in javax.faces.component"><CODE>UIData</CODE></A> must reference its previously stored information for the current <code>rowIndex</code> and call setters for each descendant as follows:</p> <ul> <li>If the descendant is an instance of <code>EditableValueHolder</code>, restore the <code>value</code> property.</li> <li>If the descendant is an instance of <code>EditableValueHolder</code>, restore the state of the <code>localValueSet</code> property.</li> <li>If the descendant is an instance of <code>EditableValueHolder</code>, restore the state of the <code>valid</code> property.</li> <li>If the descendant is an instance of <code>EditableValueHolder</code>, restore the state of the <code>submittedValue</code> property.</li> </ul><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>rowIndex</CODE> - The new row index value, or -1 for no associated row<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/faces/FacesException.html" title="class in javax.faces">FacesException</A></CODE> - if an error occurs setting the row index<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>rowIndex</code> is less than -1</DL></DD></DL><HR><A NAME="getRows()"><!-- --></A><H3>getRows</H3><PRE>public int <B>getRows</B>()</PRE><DL><DD><p>Return the number of rows to be displayed, or zero for all remaining rows in the table. The default value of this property is zero.</p><P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="setRows(int)"><!-- --></A><H3>setRows</H3><PRE>public void <B>setRows</B>(int rows)</PRE><DL><DD><p>Set the number of rows to be displayed, or zero for all remaining rows in the table.</p><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>rows</CODE> - New number of rows<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>rows</code> is negative</DL></DD></DL><HR><A NAME="getVar()"><!-- --></A><H3>getVar</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>getVar</B>()</PRE><DL><DD><p>Return the request-scope attribute under which the data object for the current row will be exposed when iterating. This property is <strong>not</strong> enabled for value binding expressions.</p><P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="setVar(java.lang.String)"><!-- --></A><H3>setVar</H3><PRE>public void <B>setVar</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> var)</PRE><DL><DD><p>Set the request-scope attribute under which the data object for the current row wil be exposed when iterating.</p><P><DD><DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -