📄 actionsource.html
字号:
if this <A HREF="../../../javax/faces/component/UIComponent.html" title="class in javax.faces.component"><CODE>UIComponent</CODE></A> is activated by the user, during the <em>Apply Request Values</em> or <em>Invoke Application</em> phase of the request processing lifecycle, depending on the value of the <code>immediate</code> property.</p><P><DD><DL></DL></DD></DL><HR><A NAME="setAction(javax.faces.el.MethodBinding)"><!-- --></A><H3>setAction</H3><PRE>void <B>setAction</B>(<A HREF="../../../javax/faces/el/MethodBinding.html" title="class in javax.faces.el">MethodBinding</A> action)</PRE><DL><DD><B>Deprecated.</B> <I>This has been replaced by <A HREF="../../../javax/faces/component/ActionSource2.html#setActionExpression(javax.el.MethodExpression)"><CODE>ActionSource2.setActionExpression(javax.el.MethodExpression)</CODE></A>.</I><P><DD><p>If the implementing class also implements <A HREF="../../../javax/faces/component/ActionSource2.html" title="interface in javax.faces.component"><CODE>ActionSource2</CODE></A>, the implementation of this method must wrap the argument <code>action</code> in a class that implements <A HREF="../../../javax/el/MethodExpression.html" title="class in javax.el"><CODE>MethodExpression</CODE></A> and call through to <A HREF="../../../javax/faces/component/ActionSource2.html#setActionExpression(javax.el.MethodExpression)"><CODE>ActionSource2.setActionExpression(javax.el.MethodExpression)</CODE></A>, passing the wrapped <code>action</code>.</p> <p>If the implementing class does not implement <code>ActionSource2</code>, set the <A HREF="../../../javax/faces/el/MethodBinding.html" title="class in javax.faces.el"><CODE>MethodBinding</CODE></A> pointing at the appication action to be invoked, if this <A HREF="../../../javax/faces/component/UIComponent.html" title="class in javax.faces.component"><CODE>UIComponent</CODE></A> is activated by the user, during the <em>Apply Request Values</em> or <em>Invoke Application</em> phase of the request processing lifecycle, depending on the value of the <code>immediate</code> property.</p> <p>Any method referenced by such an expression must be public, with a return type of <code>String</code>, and accept no parameters.</p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>action</CODE> - The new MethodBinding expression</DL></DD></DL><HR><A NAME="getActionListener()"><!-- --></A><H3>getActionListener</H3><PRE><A HREF="../../../javax/faces/el/MethodBinding.html" title="class in javax.faces.el">MethodBinding</A> <B>getActionListener</B>()</PRE><DL><DD><B>Deprecated.</B> <I>Use <A HREF="../../../javax/faces/component/ActionSource.html#getActionListeners()"><CODE>getActionListeners()</CODE></A> instead.</I><P><DD><p>If <A HREF="../../../javax/faces/component/ActionSource.html#setActionListener(javax.faces.el.MethodBinding)"><CODE>setActionListener(javax.faces.el.MethodBinding)</CODE></A> was not previously called for this instance, this method must return <code>null</code>. If it was called, this method must return the exact <code>MethodBinding</code> instance that was passed to <A HREF="../../../javax/faces/component/ActionSource.html#setActionListener(javax.faces.el.MethodBinding)"><CODE>setActionListener(javax.faces.el.MethodBinding)</CODE></A>.</p> <p> The method to be invoked, if this <A HREF="../../../javax/faces/component/UIComponent.html" title="class in javax.faces.component"><CODE>UIComponent</CODE></A> is activated by the user, will be called during the <em>Apply Request Values</em> or <em>Invoke Application</em> phase of the request processing lifecycle, depending upon the value of the <code>immediate</code> property.</p><P><DD><DL></DL></DD></DL><HR><A NAME="setActionListener(javax.faces.el.MethodBinding)"><!-- --></A><H3>setActionListener</H3><PRE>void <B>setActionListener</B>(<A HREF="../../../javax/faces/el/MethodBinding.html" title="class in javax.faces.el">MethodBinding</A> actionListener)</PRE><DL><DD><B>Deprecated.</B> <I>This has been replaced by <A HREF="../../../javax/faces/component/ActionSource.html#addActionListener(javax.faces.event.ActionListener)"><CODE>addActionListener(javax.faces.event.ActionListener)</CODE></A>.</I><P><DD><p>Wrap the argument <code>actionListener</code> in an implementation of <A HREF="../../../javax/faces/event/ActionListener.html" title="interface in javax.faces.event"><CODE>ActionListener</CODE></A> and store it in the internal data structure that backs the <A HREF="../../../javax/faces/component/ActionSource.html#getActionListeners()"><CODE>getActionListeners()</CODE></A> method, taking care to over-write any instance that was stored by a previous call to <code>setActionListener</code>.</p> <p>Any method referenced by such an expression must be public, with a return type of <code>void</code>, and accept a single parameter of type <code>ActionEvent</code>.</p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>actionListener</CODE> - The new method binding expression</DL></DD></DL><HR><A NAME="isImmediate()"><!-- --></A><H3>isImmediate</H3><PRE>boolean <B>isImmediate</B>()</PRE><DL><DD><p>Return a flag indicating that the default <A HREF="../../../javax/faces/event/ActionListener.html" title="interface in javax.faces.event"><CODE>ActionListener</CODE></A> provided by the JavaServer Faces implementation should be executed immediately (that is, during <em>Apply Request Values</em> phase of the request processing lifecycle), rather than waiting until the <em>Invoke Application</em> phase. The default value for this property must be <code>false</code>.</p><P><DD><DL></DL></DD></DL><HR><A NAME="setImmediate(boolean)"><!-- --></A><H3>setImmediate</H3><PRE>void <B>setImmediate</B>(boolean immediate)</PRE><DL><DD><p>Set the "immediate execution" flag for this <A HREF="../../../javax/faces/component/UIComponent.html" title="class in javax.faces.component"><CODE>UIComponent</CODE></A>.</p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>immediate</CODE> - The new immediate execution flag</DL></DD></DL><HR><A NAME="addActionListener(javax.faces.event.ActionListener)"><!-- --></A><H3>addActionListener</H3><PRE>void <B>addActionListener</B>(<A HREF="../../../javax/faces/event/ActionListener.html" title="interface in javax.faces.event">ActionListener</A> listener)</PRE><DL><DD><p>Add a new <A HREF="../../../javax/faces/event/ActionListener.html" title="interface in javax.faces.event"><CODE>ActionListener</CODE></A> to the set of listeners interested in being notified when <A HREF="../../../javax/faces/event/ActionEvent.html" title="class in javax.faces.event"><CODE>ActionEvent</CODE></A>s occur.</p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - The <A HREF="../../../javax/faces/event/ActionListener.html" title="interface in javax.faces.event"><CODE>ActionListener</CODE></A> to be added<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="getActionListeners()"><!-- --></A><H3>getActionListeners</H3><PRE><A HREF="../../../javax/faces/event/ActionListener.html" title="interface in javax.faces.event">ActionListener</A>[] <B>getActionListeners</B>()</PRE><DL><DD><p>Return the set of registered <A HREF="../../../javax/faces/event/ActionListener.html" title="interface in javax.faces.event"><CODE>ActionListener</CODE></A>s for this <A HREF="../../../javax/faces/component/ActionSource.html" title="interface in javax.faces.component"><CODE>ActionSource</CODE></A> instance. If there are no registered listeners, a zero-length array is returned.</p><P><DD><DL></DL></DD></DL><HR><A NAME="removeActionListener(javax.faces.event.ActionListener)"><!-- --></A><H3>removeActionListener</H3><PRE>void <B>removeActionListener</B>(<A HREF="../../../javax/faces/event/ActionListener.html" title="interface in javax.faces.event">ActionListener</A> listener)</PRE><DL><DD><p>Remove an existing <A HREF="../../../javax/faces/event/ActionListener.html" title="interface in javax.faces.event"><CODE>ActionListener</CODE></A> (if any) from the set of listeners interested in being notified when <A HREF="../../../javax/faces/event/ActionEvent.html" title="class in javax.faces.event"><CODE>ActionEvent</CODE></A>s occur.</p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - The <A HREF="../../../javax/faces/event/ActionListener.html" title="interface in javax.faces.event"><CODE>ActionListener</CODE></A> to be removed<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><!-- ========= 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"> PREV CLASS <A HREF="../../../javax/faces/component/ActionSource2.html" title="interface in javax.faces.component"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?javax/faces/component/ActionSource.html" target="_top"><B>FRAMES</B></A> <A HREF="ActionSource.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: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -