|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.faces.event Class FacesEvent
java.lang.Object java.util.EventObject javax.faces.event.FacesEvent
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- ActionEvent, ValueChangeEvent
public abstract class FacesEvent
- extends EventObject
FacesEvent 是可以由 UIComponent
激发的用户界面和应用程序事件的基类。具体的事件类必须子类化 FacesEvent
才能受到请求处理生命周期的支持。
FacesEvent is the base class for user interface and
application events that can be fired by UIComponent
s. Concrete
event classes must subclass FacesEvent
in order to be supported
by the request processing lifecycle.
- See Also:
- Serialized Form
Field Summary |
---|
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
FacesEvent(UIComponent component)
Construct a new event object from the specified source component. |
Method Summary | |
---|---|
UIComponent |
getComponent()
Return the source UIComponent that sent this event. |
PhaseId |
getPhaseId()
Return the identifier of the request processing phase during which this event should be delivered. |
abstract boolean |
isAppropriateListener(FacesListener listener)
Return true if this FacesListener is an instance
of a listener class that this event supports. |
abstract void |
processListener(FacesListener listener)
Broadcast this FacesEvent to the specified
FacesListener , by whatever mechanism is appropriate. |
void |
queue()
Convenience method to queue this event for broadcast at the end of the current request processing lifecycle phase. |
void |
setPhaseId(PhaseId phaseId)
Set the PhaseId during which this event will be
delivered. |
Methods inherited from class java.util.EventObject |
---|
getSource, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public
FacesEvent(UIComponent component)
根据指定的源组件构造一个新的事件对象。
component |
此事件的源 UIComponent |
Throws | IllegalArgumentException:
如果 component 为 null |
FacesEvent
public FacesEvent(UIComponent component)
Construct a new event object from the specified source component.
- Parameters:
component
- SourceUIComponent
for this event- Throws:
IllegalArgumentException
- ifcomponent
isnull
Method Detail |
---|
public UIComponent
getComponent()
返回发送此事件的源 UIComponent
。
getComponent
public UIComponent getComponent()
Return the source
UIComponent
that sent this event.
public PhaseId
getPhaseId()
返回传送此事件的请求处理阶段的标识符。合法值是由 PhaseId
类定义的单件实例,包括默认值 PhaseId.ANY_PHASE
。
getPhaseId
public PhaseId getPhaseId()
Return the identifier of the request processing phase during which this event should be delivered. Legal values are the singleton instances defined by the
PhaseId
class, includingPhaseId.ANY_PHASE
, which is the default value.
public void
setPhaseId(PhaseId phaseId)
设置传送此事件的 PhaseId
。
Throws | IllegalArgumentException: phaseId 为 null。 |
setPhaseId
public void setPhaseId(PhaseId phaseId)
Set the
PhaseId
during which this event will be delivered.- Throws:
IllegalArgumentException
- phaseId is null.
public void
queue()
使此事件加入队列以便在当前请求处理生命周期阶段结束时进行广播的便捷方法。
Throws | IllegalStateException:
如果此事件的源组件不是 UIViewRoot 的后代。 |
queue
public void queue()
Convenience method to queue this event for broadcast at the end of the current request processing lifecycle phase.
- Throws:
IllegalStateException
- if the source component for this event is not a descendant of aUIViewRoot
abstract public boolean
isAppropriateListener(FacesListener listener)
如果此 FacesListener
是此事件支持的侦听器类的一个实例,则返回 true
。通常,这将对侦听器类进行 "instanceof" 检查。
listener |
要求值的 FacesListener |
isAppropriateListener
public abstract boolean isAppropriateListener(FacesListener listener)
Return
true
if thisFacesListener
is an instance of a listener class that this event supports. Typically, this will be accomplished by an "instanceof" check on the listener class.- Parameters:
listener
-FacesListener
to evaluate
abstract public void
processListener(FacesListener listener)
按照适用的机制,将此 FacesEvent
广播到指定的 FacesListener
。通常,这将调用一个事件处理方法,并将此 FacesEvent
作为参数传递。
listener |
接收此 FacesEvent 的 FacesListener |
Throws | AbortProcessingException: 通知 JavaServer Face 实现不应该继续处理当前事件 |
processListener
public abstract void processListener(FacesListener listener)
Broadcast this
FacesEvent
to the specifiedFacesListener
, by whatever mechanism is appropriate. Typically, this will be accomplished by calling an event processing method, and passing thisFacesEvent
as a paramter.- Parameters:
listener
-FacesListener
to send thisFacesEvent
to- Throws:
AbortProcessingException
- Signal the JavaServer Faces implementation that no further processing on the current event should be performed
|
|||||||||
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 : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!