📄 uicommand.html
字号:
<DL><DD><B>Deprecated.</B> <I>This has been replaced by <A HREF="../../../javax/faces/component/UICommand.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>ActionSource.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>Specified by:</B><DD><CODE><A HREF="../../../javax/faces/component/ActionSource.html#setActionListener(javax.faces.el.MethodBinding)">setActionListener</A></CODE> in interface <CODE><A HREF="../../../javax/faces/component/ActionSource.html" title="interface in javax.faces.component">ActionSource</A></CODE></DL></DD><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>public boolean <B>isImmediate</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../javax/faces/component/ActionSource.html#isImmediate()">ActionSource</A></CODE></B></DD><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><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/faces/component/ActionSource.html#isImmediate()">isImmediate</A></CODE> in interface <CODE><A HREF="../../../javax/faces/component/ActionSource.html" title="interface in javax.faces.component">ActionSource</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="setImmediate(boolean)"><!-- --></A><H3>setImmediate</H3><PRE>public void <B>setImmediate</B>(boolean immediate)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../javax/faces/component/ActionSource.html#setImmediate(boolean)">ActionSource</A></CODE></B></DD><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>Specified by:</B><DD><CODE><A HREF="../../../javax/faces/component/ActionSource.html#setImmediate(boolean)">setImmediate</A></CODE> in interface <CODE><A HREF="../../../javax/faces/component/ActionSource.html" title="interface in javax.faces.component">ActionSource</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>immediate</CODE> - The new immediate execution flag</DL></DD></DL><HR><A NAME="getValue()"><!-- --></A><H3>getValue</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>getValue</B>()</PRE><DL><DD><p>Returns the <code>value</code> property of the <code>UICommand</code>. This is most often rendered as a label.</p><P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="setValue(java.lang.Object)"><!-- --></A><H3>setValue</H3><PRE>public void <B>setValue</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> value)</PRE><DL><DD><p>Sets the <code>value</code> property of the <code>UICommand</code>. This is most often rendered as a label.</p><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>value</CODE> - the new value</DL></DD></DL><HR><A NAME="getActionExpression()"><!-- --></A><H3>getActionExpression</H3><PRE>public <A HREF="../../../javax/el/MethodExpression.html" title="class in javax.el">MethodExpression</A> <B>getActionExpression</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../javax/faces/component/ActionSource2.html#getActionExpression()">ActionSource2</A></CODE></B></DD><DD><p>Return the <A HREF="../../../javax/el/MethodExpression.html" title="class in javax.el"><CODE>MethodExpression</CODE></A> pointing at the application 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>Note that it's possible that the returned <code>MethodExpression</code> is just a wrapper around a <code>MethodBinding</code> instance whith was set by a call to <A HREF="../../../javax/faces/component/ActionSource.html#setAction(javax.faces.el.MethodBinding)"><CODE>ActionSource.setAction(javax.faces.el.MethodBinding)</CODE></A>. This makes it possible for the default <A HREF="../../../javax/faces/event/ActionListener.html" title="interface in javax.faces.event"><CODE>ActionListener</CODE></A> to continue to work properly with older components.</p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/faces/component/ActionSource2.html#getActionExpression()">getActionExpression</A></CODE> in interface <CODE><A HREF="../../../javax/faces/component/ActionSource2.html" title="interface in javax.faces.component">ActionSource2</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="setActionExpression(javax.el.MethodExpression)"><!-- --></A><H3>setActionExpression</H3><PRE>public void <B>setActionExpression</B>(<A HREF="../../../javax/el/MethodExpression.html" title="class in javax.el">MethodExpression</A> actionExpression)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../javax/faces/component/ActionSource2.html#setActionExpression(javax.el.MethodExpression)">ActionSource2</A></CODE></B></DD><DD><p>Set the <A HREF="../../../javax/el/MethodExpression.html" title="class in javax.el"><CODE>MethodExpression</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>Specified by:</B><DD><CODE><A HREF="../../../javax/faces/component/ActionSource2.html#setActionExpression(javax.el.MethodExpression)">setActionExpression</A></CODE> in interface <CODE><A HREF="../../../javax/faces/component/ActionSource2.html" title="interface in javax.faces.component">ActionSource2</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>actionExpression</CODE> - The new method expression</DL></DD></DL><HR><A NAME="addActionListener(javax.faces.event.ActionListener)"><!-- --></A><H3>addActionListener</H3><PRE>public void <B>addActionListener</B>(<A HREF="../../../javax/faces/event/ActionListener.html" title="interface in javax.faces.event">ActionListener</A> listener)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../javax/faces/component/ActionSource.html#addActionListener(javax.faces.event.ActionListener)">ActionSource</A></CODE></B></DD><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>Specified by:</B><DD><CODE><A HREF="../../../javax/faces/component/ActionSource.html#addActionListener(javax.faces.event.ActionListener)">addActionListener</A></CODE> in interface <CODE><A HREF="../../../javax/faces/component/ActionSource.html" title="interface in javax.faces.component">ActionSource</A></CODE></DL></DD><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>public <A HREF="../../../javax/faces/event/ActionListener.html" title="interface in javax.faces.event">ActionListener</A>[] <B>getActionListeners</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../javax/faces/component/ActionSource.html#getActionListeners()">ActionSource</A></CODE></B></DD><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><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/faces/component/ActionSource.html#getActionListeners()">getActionListeners</A></CODE> in interface <CODE><A HREF="../../../javax/faces/component/ActionSource.html" title="interface in javax.faces.component">ActionSource</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="removeActionListener(javax.faces.event.ActionListener)"><!-- --></A><H3>removeActionListener</H3><PRE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -