viewhandler.html

来自「j2ee帮助文档软件设计/软件工程 文件格式」· HTML 代码 · 共 672 行 · 第 1/3 页

HTML
672 行
字号
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return a URL suitable for rendering (after optional encoding performed by the <code>encodeActionURL()</code> method of <A HREF="../../../javax/faces/context/ExternalContext.html" title="class in javax.faces.context"><CODE>ExternalContext</CODE></A>) that selects the specified view identifier.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/application/ViewHandler.html#getResourceURL(javax.faces.context.FacesContext, java.lang.String)">getResourceURL</A></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;path)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return a URL suitable for rendering (after optional encoding perfomed by the <code>encodeResourceURL()</code> method of <A HREF="../../../javax/faces/context/ExternalContext.html" title="class in javax.faces.context"><CODE>ExternalContext</CODE></A>) that selects the specifed web application resource.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/application/ViewHandler.html#initView(javax.faces.context.FacesContext)">initView</A></B>(<A HREF="../../../javax/faces/context/FacesContext.html" title="class in javax.faces.context">FacesContext</A>&nbsp;context)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initialize the view for the request processing lifecycle.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/application/ViewHandler.html#renderView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot)">renderView</A></B>(<A HREF="../../../javax/faces/context/FacesContext.html" title="class in javax.faces.context">FacesContext</A>&nbsp;context,           <A HREF="../../../javax/faces/component/UIViewRoot.html" title="class in javax.faces.component">UIViewRoot</A>&nbsp;viewToRender)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Perform whatever actions are required to render the response view to the response object associated with the current <A HREF="../../../javax/faces/context/FacesContext.html" title="class in javax.faces.context"><CODE>FacesContext</CODE></A>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;<A HREF="../../../javax/faces/component/UIViewRoot.html" title="class in javax.faces.component">UIViewRoot</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/application/ViewHandler.html#restoreView(javax.faces.context.FacesContext, java.lang.String)">restoreView</A></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;viewId)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Perform whatever actions are required to restore the view associated with the specified <A HREF="../../../javax/faces/context/FacesContext.html" title="class in javax.faces.context"><CODE>FacesContext</CODE></A> and <code>viewId</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/application/ViewHandler.html#writeState(javax.faces.context.FacesContext)">writeState</A></B>(<A HREF="../../../javax/faces/context/FacesContext.html" title="class in javax.faces.context">FacesContext</A>&nbsp;context)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Take any appropriate action to either immediately write out the current state information (by calling <A HREF="../../../javax/faces/application/StateManager.html#writeState(javax.faces.context.FacesContext, java.lang.Object)"><CODE>StateManager.writeState(javax.faces.context.FacesContext, java.lang.Object)</CODE></A>, or noting where state information should later be written.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.<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></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_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>Field Detail</B></FONT></TH></TR></TABLE><A NAME="CHARACTER_ENCODING_KEY"><!-- --></A><H3>CHARACTER_ENCODING_KEY</H3><PRE>public static final <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>CHARACTER_ENCODING_KEY</B></PRE><DL><DD><p>The key, in the session's attribute set, under which the response character encoding may be stored and retrieved.</p><P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.faces.application.ViewHandler.CHARACTER_ENCODING_KEY">Constant Field Values</A></DL></DL><HR><A NAME="DEFAULT_SUFFIX_PARAM_NAME"><!-- --></A><H3>DEFAULT_SUFFIX_PARAM_NAME</H3><PRE>public static final <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>DEFAULT_SUFFIX_PARAM_NAME</B></PRE><DL><DD><p>Allow the web application to define an alternate suffix for pages containing JSF content.  If this init parameter is not specified, the default value is taken from the value of the constant <A HREF="../../../javax/faces/application/ViewHandler.html#DEFAULT_SUFFIX"><CODE>DEFAULT_SUFFIX</CODE></A>.</p><P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.faces.application.ViewHandler.DEFAULT_SUFFIX_PARAM_NAME">Constant Field Values</A></DL></DL><HR><A NAME="DEFAULT_SUFFIX"><!-- --></A><H3>DEFAULT_SUFFIX</H3><PRE>public static final <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>DEFAULT_SUFFIX</B></PRE><DL><DD><p>The value to use for the default extension if the webapp is using url extension mapping.</p><P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.faces.application.ViewHandler.DEFAULT_SUFFIX">Constant Field Values</A></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_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>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="ViewHandler()"><!-- --></A><H3>ViewHandler</H3><PRE>public <B>ViewHandler</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="calculateLocale(javax.faces.context.FacesContext)"><!-- --></A><H3>calculateLocale</H3><PRE>public abstract <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/util/Locale.html" title="class or interface in java.util">Locale</A> <B>calculateLocale</B>(<A HREF="../../../javax/faces/context/FacesContext.html" title="class in javax.faces.context">FacesContext</A>&nbsp;context)</PRE><DL><DD><p>Returns an appropriate <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/util/Locale.html" title="class or interface in java.util"><CODE>Locale</CODE></A> to use for this and subsequent requests for the current client.</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<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="calculateCharacterEncoding(javax.faces.context.FacesContext)"><!-- --></A><H3>calculateCharacterEncoding</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>calculateCharacterEncoding</B>(<A HREF="../../../javax/faces/context/FacesContext.html" title="class in javax.faces.context">FacesContext</A>&nbsp;context)</PRE><DL><DD><p>Returns the correct character encoding to be used for this request.</p> <p>The following algorithm is employed.</p> <ul> <li><p>Examine the <code>Content-Type</code> request header.  If it has  a <code>charset</code> parameter, extract it and return that as the  encoding.</p></li> <li><p>If no <code>charset</code> parameter was found, check for the  existence of a session by calling <A HREF="../../../javax/faces/context/ExternalContext.html#getSession(boolean)"><CODE>ExternalContext.getSession(boolean)</CODE></A>  passing <code>false</code> as the argument.  If that method returns  <code>true</code>, get the session Map by calling  <A HREF="../../../javax/faces/context/ExternalContext.html#getSessionMap()"><CODE>ExternalContext.getSessionMap()</CODE></A> and look for a value under the  key given by the value of the symbolic constant  <A HREF="../../../javax/faces/application/ViewHandler.html#CHARACTER_ENCODING_KEY"><CODE>CHARACTER_ENCODING_KEY</CODE></A>. If present, return the value, converted to String.</p></li> <li><p>Otherwise, return <code>null</code></p></li> </ul><P><DD><DL></DL></DD></DL><HR><A NAME="calculateRenderKitId(javax.faces.context.FacesContext)"><!-- --></A><H3>calculateRenderKitId</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>calculateRenderKitId</B>(<A HREF="../../../javax/faces/context/FacesContext.html" title="class in javax.faces.context">FacesContext</A>&nbsp;context)</PRE><DL><DD><p>Return an appropriate <code>renderKitId</code> for this and subsequent requests from the current client.  It is an error for this method to return <code>null</code>.</p> <p>The default return value is <A HREF="../../../javax/faces/render/RenderKitFactory.html#HTML_BASIC_RENDER_KIT"><CODE>RenderKitFactory.HTML_BASIC_RENDER_KIT</CODE></A>.</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<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="createView(javax.faces.context.FacesContext, java.lang.String)"><!-- --></A><H3>createView</H3><PRE>public abstract <A HREF="../../../javax/faces/component/UIViewRoot.html" title="class in javax.faces.component">UIViewRoot</A> <B>createView</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;viewId)</PRE><DL>

⌨️ 快捷键说明

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