|
|
Java EE 5 SDK 深圳电信培训中心.徐海蛟老师. |
||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造器 | 方法 | 详细信息: 字段 | 构造器 | 方法 | ||||||||
javax.faces.component Interface ActionSource
- 所有已知子接口:
- ActionSource2
- 所有已知实现子孙类:
- HtmlCommandButton, HtmlCommandLink, UICommand
public interface ActionSource
ActionSource is an interface that may be implemented
by any concrete UIComponent that wishes to be a source of
ActionEvents, including the ability to invoke application
actions via the default ActionListener mechanism.
| 方法摘要 | |
|---|---|
void |
addActionListener(ActionListener listener)
Add a new ActionListener to the set of listeners interested
in being notified when ActionEvents occur. |
MethodBinding |
getAction()
Deprecated. This has been replaced by ActionSource2.getActionExpression(). |
MethodBinding |
getActionListener()
Deprecated. Use getActionListeners() instead. |
ActionListener[] |
getActionListeners()
Return the set of registered ActionListeners for this
ActionSource instance. |
boolean |
isImmediate()
Return a flag indicating that the default ActionListener
provided by the JavaServer Faces implementation should be executed
immediately (that is, during Apply Request Values phase
of the request processing lifecycle), rather than waiting until the
Invoke Application phase. |
void |
removeActionListener(ActionListener listener)
Remove an existing ActionListener (if any) from the set of
listeners interested in being notified when ActionEvents
occur. |
void |
setAction(MethodBinding action)
Deprecated. This has been replaced by ActionSource2.setActionExpression(javax.el.MethodExpression). |
void |
setActionListener(MethodBinding actionListener)
Deprecated. This has been replaced by addActionListener(javax.faces.event.ActionListener). |
void |
setImmediate(boolean immediate)
Set the "immediate execution" flag for this UIComponent. |
| 方法详细信息 |
|---|
getAction
MethodBinding getAction()
- Deprecated. This has been replaced by
ActionSource2.getActionExpression(). If the implementing class also implements
ActionSource2, the implementation of this method must call through toActionSource2.getActionExpression()and examine the result. If the result came from a previous call tosetAction(javax.faces.el.MethodBinding), extract theMethodBindingfrom it and return it. Otherwise, wrap the returnedMethodExpressionin aMethodBindingimplementation, and return it.If the implementing class does not implement
ActionSource2, return theMethodBindingpointing at the application action to be invoked, if thisUIComponentis activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending on the value of theimmediateproperty.
setAction
void setAction(MethodBinding action)
- Deprecated. This has been replaced by
ActionSource2.setActionExpression(javax.el.MethodExpression). If the implementing class also implements
ActionSource2, the implementation of this method must wrap the argumentactionin a class that implementsMethodExpressionand call through toActionSource2.setActionExpression(javax.el.MethodExpression), passing the wrappedaction.If the implementing class does not implement
ActionSource2, set theMethodBindingpointing at the appication action to be invoked, if thisUIComponentis activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending on the value of theimmediateproperty.Any method referenced by such an expression must be public, with a return type of
String, and accept no parameters.- 参数:
action- The new MethodBinding expression
getActionListener
MethodBinding getActionListener()
- Deprecated. Use
getActionListeners()instead. If
setActionListener(javax.faces.el.MethodBinding)was not previously called for this instance, this method must returnnull. If it was called, this method must return the exactMethodBindinginstance that was passed tosetActionListener(javax.faces.el.MethodBinding).The method to be invoked, if this
UIComponentis activated by the user, will be called during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending upon the value of theimmediateproperty.
setActionListener
void setActionListener(MethodBinding actionListener)
- Deprecated. This has been replaced by
addActionListener(javax.faces.event.ActionListener). Wrap the argument
actionListenerin an implementation ofActionListenerand store it in the internal data structure that backs thegetActionListeners()method, taking care to over-write any instance that was stored by a previous call tosetActionListener.Any method referenced by such an expression must be public, with a return type of
void, and accept a single parameter of typeActionEvent.- 参数:
actionListener- The new method binding expression
isImmediate
boolean isImmediate()
Return a flag indicating that the default
ActionListenerprovided by the JavaServer Faces implementation should be executed immediately (that is, during Apply Request Values phase of the request processing lifecycle), rather than waiting until the Invoke Application phase. The default value for this property must befalse.
setImmediate
void setImmediate(boolean immediate)
Set the "immediate execution" flag for this
UIComponent.- 参数:
immediate- The new immediate execution flag
addActionListener
void addActionListener(ActionListener listener)
Add a new
ActionListenerto the set of listeners interested in being notified whenActionEvents occur.- 参数:
listener- TheActionListenerto be added- 抛出异常:
NullPointerException- iflistenerisnull
getActionListeners
ActionListener[] getActionListeners()
Return the set of registered
ActionListeners for thisActionSourceinstance. If there are no registered listeners, a zero-length array is returned.
removeActionListener
void removeActionListener(ActionListener listener)
Remove an existing
ActionListener(if any) from the set of listeners interested in being notified whenActionEvents occur.- 参数:
listener- TheActionListenerto be removed- 抛出异常:
NullPointerException- iflistenerisnull
|
|
Java EE 5 SDK 深圳电信培训中心.徐海蛟老师. |
||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造器 | 方法 | 详细信息: 字段 | 构造器 | 方法 | ||||||||
提交错误或意见
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。深圳电信培训中心.徐海蛟老师教学参考.