|
ICEfaces ICE Components 3.3.0 Java API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
javax.faces.event.FacesEvent
com.icesoft.faces.component.menupopup.MenuContextEvent
public class MenuContextEvent
A MenuContextEvent encapsulates the information about which UIComponent was context-clicked on by the user, in order to display the menuPopup, and thus, on which UIComponent actions should be taken.
The source UIComponent, for this event, has a menuContext attribute, which is how it specified to receive MenuContextEvents.
Unlike most FacesEvents, which are queued up, and sent via MethodBindings, at the end of whichever phase, MenuContextEvent is set via ValueBindings during the Apply Request Values phase, while UIData, or other containers, are iterating over their children, so that bean code can use MenuContextEvent.getComponent() to access any row specific information it needs. The Apply Request Values phase is used, so that the MenuContextEvent data is available to the bean, before the MenuItem actionListener is called, which is in the Invoke Application phase, or at the end of the Apply Request Values phase, if immediate="true".
MenuContextEvent provides context for a specific component in the hierarchy, but there can be several levels for which contextual information is necessary. If there are nested dataTables, then context will be needed for each dataTable, as well as the columns. To facilitate this, each MenuContextEvent is a part of a double-linked-list of MenuContextEvents, which together provide the complete context. Bean code can process each MenuContextEvent separately, in its own listener method, or process the terminal MenuContextEvent, and follow its outer references, all within a single method.
Field Summary |
---|
Fields inherited from class java.util.EventObject |
---|
source |
Method Summary | |
---|---|
MenuContextEvent |
getInner()
The inner MenuContextEvent is the event corresponding to the source UIComponent that is the nearest child of this event's source UIComponent, for which there is a menuContext attribute. |
MenuContextEvent |
getOuter()
The outer MenuContextEvent is the event corresponding to the source UIComponent that is the nearest parent of this event's source UIComponent, for which there is a menuContext attribute. |
boolean |
isAppropriateListener(javax.faces.event.FacesListener facesListener)
MenuContextEvent is not enqueued and broadcast, so this is not relevant |
boolean |
isTerminal()
A MenuContextEvent is terminal if it is the inner-most event providing context for which UIComponent was context-clicked on by the user, in order to display the menuPopup. |
void |
process(javax.faces.context.FacesContext facesContext)
|
void |
processListener(javax.faces.event.FacesListener facesListener)
MenuContextEvent is not enqueued and broadcast, so this is not relevant |
Methods inherited from class javax.faces.event.FacesEvent |
---|
getComponent, getPhaseId, queue, setPhaseId |
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 |
Method Detail |
---|
public MenuContextEvent getOuter()
public MenuContextEvent getInner()
public boolean isTerminal()
public void process(javax.faces.context.FacesContext facesContext)
public boolean isAppropriateListener(javax.faces.event.FacesListener facesListener)
isAppropriateListener
in class javax.faces.event.FacesEvent
public void processListener(javax.faces.event.FacesListener facesListener)
processListener
in class javax.faces.event.FacesEvent
|
ICEfaces ICE Components 3.3.0 Java API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |