application.html
来自「j2ee帮助文档软件设计/软件工程 文件格式」· HTML 代码 · 共 1,031 行 · 第 1/5 页
HTML
1,031 行
appication. If not explicitly set, a default implementation must be provided that performs the following functions:</p> <ul> <li>The <code>processAction()</code> method must first call <code>FacesContext.renderResponse()</code> in order to bypass any intervening lifecycle phases, once the method returns.</li> <li>The <code>processAction()</code> method must next determine the logical outcome of this event, as follows: <ul> <li>If the originating component has a non-<code>null</code> <code>action</code> property, retrieve the <A HREF="../../../javax/faces/el/MethodBinding.html" title="class in javax.faces.el"><CODE>MethodBinding</CODE></A> from the property, and call <code>invoke()</code> on it. Convert the returned value (if any) to a String, and use it as the logical outcome.</li> <li>Otherwise, the logical outcome is <code>null</code>.</li> </ul></li> <li>The <code>processAction()</code> method must finally retrieve the <code>NavigationHandler</code> instance for this application and call <A HREF="../../../javax/faces/application/NavigationHandler.html#handleNavigation(javax.faces.context.FacesContext, java.lang.String, java.lang.String)"><CODE>NavigationHandler.handleNavigation(javax.faces.context.FacesContext, java.lang.String, java.lang.String)</CODE></A> passing: <ul> <li>the <A HREF="../../../javax/faces/context/FacesContext.html" title="class in javax.faces.context"><CODE>FacesContext</CODE></A> for the current request</li> <li>If there is a <code>MethodBinding</code> instance for the <code>action</code> property of this component, the result of calling <A HREF="../../../javax/faces/el/MethodBinding.html#getExpressionString()"><CODE>MethodBinding.getExpressionString()</CODE></A> on it, null otherwise</li> <li>the logical outcome as determined above</li> </ul> </li> </ul> <p>Note that the specification for the default <code>ActionListener</code> contiues to call for the use of a <strong>deprecated</strong> property (<code>action</code>) and class (<code>MethodBinding</code>). Unfortunately, this is necessary because the default <code>ActionListener</code> must continue to work with components that do not implement <A HREF="../../../javax/faces/component/ActionSource2.html" title="interface in javax.faces.component"><CODE>ActionSource2</CODE></A>, and only implement <A HREF="../../../javax/faces/component/ActionSource.html" title="interface in javax.faces.component"><CODE>ActionSource</CODE></A>.</p><P><DD><DL></DL></DD></DL><HR><A NAME="setActionListener(javax.faces.event.ActionListener)"><!-- --></A><H3>setActionListener</H3><PRE>public abstract void <B>setActionListener</B>(<A HREF="../../../javax/faces/event/ActionListener.html" title="interface in javax.faces.event">ActionListener</A> listener)</PRE><DL><DD><p>Set the default <A HREF="../../../javax/faces/event/ActionListener.html" title="interface in javax.faces.event"><CODE>ActionListener</CODE></A> to be registered for all <A HREF="../../../javax/faces/component/ActionSource.html" title="interface in javax.faces.component"><CODE>ActionSource</CODE></A> components.</p> </p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - The new default <A HREF="../../../javax/faces/event/ActionListener.html" title="interface in javax.faces.event"><CODE>ActionListener</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>listener</code> is <code>null</code></DL></DD></DL><HR><A NAME="getDefaultLocale()"><!-- --></A><H3>getDefaultLocale</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>getDefaultLocale</B>()</PRE><DL><DD><p>Return the default <code>Locale</code> for this application. If not explicitly set, <code>null</code> is returned.</p><P><DD><DL></DL></DD></DL><HR><A NAME="setDefaultLocale(java.util.Locale)"><!-- --></A><H3>setDefaultLocale</H3><PRE>public abstract void <B>setDefaultLocale</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/util/Locale.html" title="class or interface in java.util">Locale</A> locale)</PRE><DL><DD><p>Set the default <code>Locale</code> for this application.</p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>locale</CODE> - The new default <code>Locale</code><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>locale</code> is <code>null</code></DL></DD></DL><HR><A NAME="getDefaultRenderKitId()"><!-- --></A><H3>getDefaultRenderKitId</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>getDefaultRenderKitId</B>()</PRE><DL><DD><p>Return the <code>renderKitId</code> to be used for rendering this application. If not explicitly set, <code>null</code> is returned.</p><P><DD><DL></DL></DD></DL><HR><A NAME="setDefaultRenderKitId(java.lang.String)"><!-- --></A><H3>setDefaultRenderKitId</H3><PRE>public abstract void <B>setDefaultRenderKitId</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> renderKitId)</PRE><DL><DD><p>Set the <code>renderKitId</code> to be used to render this application. Unless the client has provided a custom <A HREF="../../../javax/faces/application/ViewHandler.html" title="class in javax.faces.application"><CODE>ViewHandler</CODE></A> that supports the use of multiple <A HREF="../../../javax/faces/render/RenderKit.html" title="class in javax.faces.render"><CODE>RenderKit</CODE></A> instances in the same application, this method must only be called at application startup, before any Faces requests have been processed. This is a limitation of the current Specification, and may be lifted in a future release.</p><P><DD><DL></DL></DD></DL><HR><A NAME="getMessageBundle()"><!-- --></A><H3>getMessageBundle</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>getMessageBundle</B>()</PRE><DL><DD><p>Return the fully qualified class name of the <code>ResourceBundle</code> to be used for JavaServer Faces messages for this application. If not explicitly set, <code>null</code> is returned.</p><P><DD><DL></DL></DD></DL><HR><A NAME="setMessageBundle(java.lang.String)"><!-- --></A><H3>setMessageBundle</H3><PRE>public abstract void <B>setMessageBundle</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> bundle)</PRE><DL><DD><p>Set the fully qualified class name of the <code>ResourceBundle</code> to be used for JavaServer Faces messages for this application. See the JavaDocs for the <code>java.util.ResourceBundle</code> class for more information about the syntax for resource bundle names.</p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>bundle</CODE> - Base name of the resource bundle to be used<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>bundle</code> is <code>null</code></DL></DD></DL><HR><A NAME="getNavigationHandler()"><!-- --></A><H3>getNavigationHandler</H3><PRE>public abstract <A HREF="../../../javax/faces/application/NavigationHandler.html" title="class in javax.faces.application">NavigationHandler</A> <B>getNavigationHandler</B>()</PRE><DL><DD><p>Return the <A HREF="../../../javax/faces/application/NavigationHandler.html" title="class in javax.faces.application"><CODE>NavigationHandler</CODE></A> instance that will be passed the outcome returned by any invoked application action for this web application. If not explicitly set, a default implementation must be provided that performs the functions described in the <A HREF="../../../javax/faces/application/NavigationHandler.html" title="class in javax.faces.application"><CODE>NavigationHandler</CODE></A> class description.</p><P><DD><DL></DL></DD></DL><HR><A NAME="setNavigationHandler(javax.faces.application.NavigationHandler)"><!-- --></A><H3>setNavigationHandler</H3><PRE>public abstract void <B>setNavigationHandler</B>(<A HREF="../../../javax/faces/application/NavigationHandler.html" title="class in javax.faces.application">NavigationHandler</A> handler)</PRE><DL><DD><p>Set the <A HREF="../../../javax/faces/application/NavigationHandler.html" title="class in javax.faces.application"><CODE>NavigationHandler</CODE></A> instance that will be passed the outcome returned by any invoked application action for this web application.</p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>handler</CODE> - The new <A HREF="../../../javax/faces/application/NavigationHandler.html" title="class in javax.faces.application"><CODE>NavigationHandler</CODE></A> instance<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>handler</code> is <code>null</code></DL></DD></DL><HR><A NAME="getPropertyResolver()"><!-- --></A><H3>getPropertyResolver</H3><PRE>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?