ActionSource2 (Java EE 5 SDK)

Java

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


javax.faces.component Interface ActionSource2

所有父接口:
ActionSource
所有已知实现子孙类:
HtmlCommandButton, HtmlCommandLink, UICommand

public interface ActionSource2
extends ActionSource

ActionSource2 extends ActionSource and provides a JavaBeans property analogous to the "action" property on ActionSource. The difference is the type of this property is a MethodExpression rather than a MethodBinding. This allows the ActionSource concept to leverage the new Unified EL API.

从以下版本开始:
1.2

方法摘要
 MethodExpression getActionExpression()
          Return the MethodExpression pointing at the application action to be invoked, if this UIComponent is activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending on the value of the immediate property.
 void setActionExpression(MethodExpression action)
          Set the MethodExpression pointing at the appication action to be invoked, if this UIComponent is activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending on the value of the immediate property.
 
Methods inherited from interface javax.faces.component.ActionSource
addActionListener, getAction, getActionListener, getActionListeners, isImmediate, removeActionListener, setAction, setActionListener, setImmediate
 

方法详细信息

getActionExpression

MethodExpression getActionExpression()

Return the MethodExpression pointing at the application action to be invoked, if this UIComponent is activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending on the value of the immediate property.

Note that it's possible that the returned MethodExpression is just a wrapper around a MethodBinding instance whith was set by a call to ActionSource.setAction(javax.faces.el.MethodBinding). This makes it possible for the default ActionListener to continue to work properly with older components.


setActionExpression

void setActionExpression(MethodExpression action)

Set the MethodExpression pointing at the appication action to be invoked, if this UIComponent is activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending on the value of the immediate property.

Any method referenced by such an expression must be public, with a return type of String, and accept no parameters.

参数:
action - The new method expression

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


提交错误或意见

版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。深圳电信培训中心.徐海蛟老师教学参考.