statemanager.html
来自「j2ee帮助文档软件设计/软件工程 文件格式」· HTML 代码 · 共 780 行 · 第 1/4 页
HTML
780 行
<p/> <p>This method must consult the context initialization parameter named by the symbolic constant <code>StateManager.STATE_SAVING_METHOD_PARAMETER_NAME</code> to determine whether state should be saved on the client or the server. If not present, client side state saving is assumed.</p> <p/> <p>If the init parameter indicates that client side state saving should be used, this method must delegate the actual writing to the <code>writeState()</code> method of the <A HREF="../../../javax/faces/render/ResponseStateManager.html" title="class in javax.faces.render"><CODE>ResponseStateManager</CODE></A> instance provided by the <A HREF="../../../javax/faces/render/RenderKit.html" title="class in javax.faces.render"><CODE>RenderKit</CODE></A> being used to render this view. This method assumes that the caller has positioned the <A HREF="../../../javax/faces/context/ResponseWriter.html" title="class in javax.faces.context"><CODE>ResponseWriter</CODE></A> at the correct position for the saved state to be written.</p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>context</CODE> - <A HREF="../../../javax/faces/context/FacesContext.html" title="class in javax.faces.context"><CODE>FacesContext</CODE></A> for the current request<DD><CODE>state</CODE> - the serialized state to be written<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL></DD></DL><HR><A NAME="restoreView(javax.faces.context.FacesContext, java.lang.String, java.lang.String)"><!-- --></A><H3>restoreView</H3><PRE>public abstract <A HREF="../../../javax/faces/component/UIViewRoot.html" title="class in javax.faces.component">UIViewRoot</A> <B>restoreView</B>(<A HREF="../../../javax/faces/context/FacesContext.html" title="class in javax.faces.context">FacesContext</A> 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> viewId, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> renderKitId)</PRE><DL><DD><p>Restore the tree structure and the component state of the view for the specified <code>viewId</code>, in an implementation dependent manner, and return the restored <A HREF="../../../javax/faces/component/UIViewRoot.html" title="class in javax.faces.component"><CODE>UIViewRoot</CODE></A>. If there is no saved state information available for this <code>viewId</code>, return <code>null</code> instead.</p> <p/> <p>This method must consult the context initialization parameter named by the symbolic constant <code>StateManager.STATE_SAVING_METHOD_PARAMETER_NAME</code> to determine whether state should be saved on the client or the server. If not present, client side state saving is assumed.</p> <p/> <p>If the init parameter indicates that client side state saving should be used, this method must call the <code>getTreeStructureToRestore()</code> and (if the previous method call returned a non-null value) <code>getComponentStateToRestore()</code> methods of the <A HREF="../../../javax/faces/render/ResponseStateManager.html" title="class in javax.faces.render"><CODE>ResponseStateManager</CODE></A> instance provided by the <A HREF="../../../javax/faces/render/RenderKit.html" title="class in javax.faces.render"><CODE>RenderKit</CODE></A> responsible for this view.</p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>context</CODE> - <A HREF="../../../javax/faces/context/FacesContext.html" title="class in javax.faces.context"><CODE>FacesContext</CODE></A> for the current request<DD><CODE>viewId</CODE> - View identifier of the view to be restored<DD><CODE>renderKitId</CODE> - the renderKitId used to render this response. Must not be <code>null</code>.<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>renderKitId</code> is <code>null</code>.</DL></DD></DL><HR><A NAME="restoreTreeStructure(javax.faces.context.FacesContext, java.lang.String, java.lang.String)"><!-- --></A><H3>restoreTreeStructure</H3><PRE>protected <A HREF="../../../javax/faces/component/UIViewRoot.html" title="class in javax.faces.component">UIViewRoot</A> <B>restoreTreeStructure</B>(<A HREF="../../../javax/faces/context/FacesContext.html" title="class in javax.faces.context">FacesContext</A> 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> viewId, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> renderKitId)</PRE><DL><DD><B>Deprecated.</B> <I>the distinction between tree structure and component state is now an implementation detail. The default implementation returns <code>null</code>.</I><P><DD><p>Convenience method, which must be called by <code>restoreView()</code>, to construct and return a <A HREF="../../../javax/faces/component/UIViewRoot.html" title="class in javax.faces.component"><CODE>UIViewRoot</CODE></A> instance (populated with children and facets) representing the tree structure of the component tree being restored. If no saved state information is available, return <code>null</code> instead.</p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>context</CODE> - <A HREF="../../../javax/faces/context/FacesContext.html" title="class in javax.faces.context"><CODE>FacesContext</CODE></A> for the current request<DD><CODE>viewId</CODE> - View identifier of the view to be restored<DD><CODE>renderKitId</CODE> - the renderKitId used to render this response. Must not be <code>null</code>.<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>renderKitId</code> is <code>null</code>.</DL></DD></DL><HR><A NAME="restoreComponentState(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot, java.lang.String)"><!-- --></A><H3>restoreComponentState</H3><PRE>protected void <B>restoreComponentState</B>(<A HREF="../../../javax/faces/context/FacesContext.html" title="class in javax.faces.context">FacesContext</A> context, <A HREF="../../../javax/faces/component/UIViewRoot.html" title="class in javax.faces.component">UIViewRoot</A> viewRoot, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> renderKitId)</PRE><DL><DD><B>Deprecated.</B> <I>the distinction between tree structure and component state is now an implementation detail. The default implementation does nothing.</I><P><DD><p>Convenience method, which must be called by <code>restoreView()</code>, to restore the attributes, properties, and attached objects of all components in the restored component tree. </p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>context</CODE> - <A HREF="../../../javax/faces/context/FacesContext.html" title="class in javax.faces.context"><CODE>FacesContext</CODE></A> for the current request<DD><CODE>viewRoot</CODE> - <A HREF="../../../javax/faces/component/UIViewRoot.html" title="class in javax.faces.component"><CODE>UIViewRoot</CODE></A> returned by a previous call to <code>restoreTreeStructure()</code><DD><CODE>renderKitId</CODE> - the renderKitId used to render this response. Must not be <code>null</code>.<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>renderKitId</code> is <code>null</code>.</DL></DD></DL><HR><A NAME="isSavingStateInClient(javax.faces.context.FacesContext)"><!-- --></A><H3>isSavingStateInClient</H3><PRE>public boolean <B>isSavingStateInClient</B>(<A HREF="../../../javax/faces/context/FacesContext.html" title="class in javax.faces.context">FacesContext</A> context)</PRE><DL><DD><DL><DT><B>Returns:</B><DD><code>true</code> if and only if the value of the <code>ServletContext</code> init parameter named by the value of the constant <A HREF="../../../javax/faces/application/StateManager.html#STATE_SAVING_METHOD_PARAM_NAME"><CODE>STATE_SAVING_METHOD_PARAM_NAME</CODE></A> is equal to the value of the constant <A HREF="../../../javax/faces/application/StateManager.html#STATE_SAVING_METHOD_CLIENT"><CODE>STATE_SAVING_METHOD_CLIENT</CODE></A>. <code>false</code> otherwise.<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><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/faces/application/NavigationHandler.html" title="class in javax.faces.application"><B>PREV CLASS</B></A> <A HREF="../../../javax/faces/application/StateManager.SerializedView.html" title="class in javax.faces.application"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?javax/faces/application/StateManager.html" target="_top"><B>FRAMES</B></A> <A HREF="StateManager.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1"><a href="http://java.sun.com/webapps/bugreport">Submit a bug or feature</a> <p>Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to <a href="../legal/license.html" target="_top">license terms.</a></font></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?