|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EventSource
The EventSource interface defines a minimal component interface to provide an application with simple GUI events. These GUI events reflect "gestures" made by the user, such as selecting a menu option, or any action that results in a reqeust value representing that action submitted in a request either by "form.submit" or an XmlHttpRequest. The intention is that specific event components will implement this interface and define their own subclass of FacesEvents. A typical event would include the appropriate phase in which the event should be broadcast, the EventSource component as the source of the event and the event payload which will be the converted request value. For example, a Menu component would implement EventSource and when a Menu gesture is seen in the request, will queue an appropriate event, with the component instance as the source and the result of calling "getConvertedValue" either implemented in the renderer or the component as the Event payload. It is this payload that the application can inspect to indicate the Menu "selection" and act accordingly. In addition EventSource can be implemented to support the navigational features of an ActionSource.
Method Summary | |
---|---|
void |
addEventListener(com.sun.webui.jsf.event.EventListener listener)
Add a new EventListener to the set of listeners interested
in being notified when EventSource events s occur. |
javax.el.MethodExpression |
getEventExpression()
Return the MethodExpression pointing at the application
action to be invoked, if this UIComponent is activated by
the user, during PhaseId.ANY in case of immediate
or PhaseId.INVOKE_APPLICATION phase by default,
or the specific phase as set on the event of the request processing
lifecycle, |
com.sun.webui.jsf.event.EventListener[] |
getEventListeners()
Return the set of registered EventListener s for this
EventSource instance. |
boolean |
isImmediate()
Return a flag indicating that this event should be broadcast at the next available opportunity, ususally between lifecycle phases i.e. |
void |
removeEventListener(com.sun.webui.jsf.event.EventListener listener)
Remove an existing EventListener (if any) from the set of
listeners interested in being notified when EventSource events
occur. |
void |
setEventExpression(javax.el.MethodExpression eventExpression)
Set the MethodExpression pointing at the application
action to be invoked, if this UIComponent is activated by
the user, during PhaseId.ANY in case of immediate
or PhaseId.INVOKE_APPLICATION phase by default,
or the specific phase as set on the event of the request processing
lifecycle, |
void |
setImmediate(boolean immediate)
Set the "immediate execution" flag for this UIComponent . |
Method Detail |
---|
boolean isImmediate()
PhaseId.ANY
.
void setImmediate(boolean immediate)
Set the "immediate execution" flag for this UIComponent
.
immediate
- The new immediate execution flagvoid addEventListener(com.sun.webui.jsf.event.EventListener listener)
Add a new EventListener
to the set of listeners interested
in being notified when EventSource
events s occur.
listener
- The EventListener
to be added
java.lang.NullPointerException
- if listener
is null
com.sun.webui.jsf.event.EventListener[] getEventListeners()
Return the set of registered EventListener
s for this
EventSource
instance. If there are no registered listeners,
a zero-length array is returned.
void removeEventListener(com.sun.webui.jsf.event.EventListener listener)
Remove an existing EventListener
(if any) from the set of
listeners interested in being notified when EventSource
events
occur.
listener
- The EventListener
to be removed
java.lang.NullPointerException
- if listener
is null
javax.el.MethodExpression getEventExpression()
MethodExpression
pointing at the application
action to be invoked, if this UIComponent
is activated by
the user, during PhaseId.ANY in case of immediate
or PhaseId.INVOKE_APPLICATION phase by default,
or the specific phase as set on the event of the request processing
lifecycle,
void setEventExpression(javax.el.MethodExpression eventExpression)
Set the MethodExpression
pointing at the application
action to be invoked, if this UIComponent
is activated by
the user, during PhaseId.ANY in case of immediate
or PhaseId.INVOKE_APPLICATION phase by default,
or the specific phase as set on the event of the request processing
lifecycle,
Any method referenced by such an expression must be public, with
a return type of String
, and accept no parameters.
eventExpression
- The new method expression
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |