|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.faces.component Interface ActionSource2
- All Superinterfaces:
- ActionSource
- All Known Implementing Classes:
- HtmlCommandButton, HtmlCommandLink, UICommand
public interface ActionSource2
- extends ActionSource
ActionSource2 扩展 ActionSource
,并提供与 ActionSource
上的 "action
" 属性类似的 JavaBeans 属性。不同之处在于,此属性的类型是 MethodExpression
而不是 MethodBinding
。这就允许 ActionSource
概念利用新的统一 EL API。
since | 1.2 |
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.
- Since:
- 1.2
Method Summary | |
---|---|
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 |
Method Detail |
---|
public MethodExpression
getActionExpression()
返回一个 MethodExpression
,该 MethodExpression
指向用户激活此 UIComponent
时要在请求处理生命周期的应用请求值 或调用应用程序 阶段(取决于 immediate
属性的值)调用的应用程序操作。
注意,返回的 MethodExpression
有可能仅是通过调用 ActionSource#setAction
设置的 MethodBinding
实例周围的包装器。这使得默认 ActionListener
有可能继续与旧的组件一起正常工作。
getActionExpression
MethodExpression getActionExpression()
Return the
MethodExpression
pointing at the application action to be invoked, if thisUIComponent
is activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending on the value of theimmediate
property.Note that it's possible that the returned
MethodExpression
is just a wrapper around aMethodBinding
instance whith was set by a call toActionSource.setAction(javax.faces.el.MethodBinding)
. This makes it possible for the defaultActionListener
to continue to work properly with older components.
public void
setActionExpression(MethodExpression action)
设置一个 MethodExpression
,该 MethodExpression
指向用户激活此 UIComponent
时要在请求处理生命周期的应用请求值 或调用应用程序 阶段(取决于 immediate
属性的值)调用的应用程序操作。
此表达式所引用的任何方法都必须是公共的,返回类型为 String
,并且不接受任何参数。
action | 新的方法表达式 |
setActionExpression
void setActionExpression(MethodExpression action)
Set the
MethodExpression
pointing at the appication action to be invoked, if thisUIComponent
is activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending on the value of theimmediate
property.Any method referenced by such an expression must be public, with a return type of
String
, and accept no parameters.- Parameters:
action
- The new method expression
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!