Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 2 (11.1.2.2.0)
E17488-03


oracle.adf.view.rich.event
Class BasePolytypeListener

java.lang.Object
  extended by oracle.adf.view.rich.event.BasePolytypeListener

All Implemented Interfaces:
java.util.EventListener, javax.faces.component.StateHolder, javax.faces.event.ActionListener, javax.faces.event.FacesListener, javax.faces.event.ValueChangeListener, CalendarActivityDurationChangeListener, CalendarActivityListener, CalendarDisplayChangeListener, CalendarListener, CarouselSpinListener, ContextInfoListener, DialogListener, LaunchPopupListener, PopupCanceledListener, PopupFetchListener, QueryListener, QueryOperationListener, RegionNavigationListener, ReturnPopupDataListener, ReturnPopupListener, org.apache.myfaces.trinidad.event.DisclosureListener, org.apache.myfaces.trinidad.event.FocusListener, org.apache.myfaces.trinidad.event.LaunchListener, org.apache.myfaces.trinidad.event.PollListener, org.apache.myfaces.trinidad.event.RangeChangeListener, org.apache.myfaces.trinidad.event.ReturnListener, org.apache.myfaces.trinidad.event.RowDisclosureListener, org.apache.myfaces.trinidad.event.SelectionListener, org.apache.myfaces.trinidad.event.SortListener
Direct Known Subclasses:
ResetListener, SetPropertyListener

public abstract class BasePolytypeListener
extends java.lang.Object
implements javax.faces.component.StateHolder, javax.faces.event.ActionListener, javax.faces.event.ValueChangeListener, org.apache.myfaces.trinidad.event.DisclosureListener, PopupFetchListener, PopupCanceledListener, org.apache.myfaces.trinidad.event.FocusListener, org.apache.myfaces.trinidad.event.LaunchListener, org.apache.myfaces.trinidad.event.PollListener, org.apache.myfaces.trinidad.event.RangeChangeListener, org.apache.myfaces.trinidad.event.ReturnListener, org.apache.myfaces.trinidad.event.RowDisclosureListener, org.apache.myfaces.trinidad.event.SelectionListener, org.apache.myfaces.trinidad.event.SortListener, DialogListener, LaunchPopupListener, QueryListener, QueryOperationListener, RegionNavigationListener, ReturnPopupDataListener, ReturnPopupListener, CalendarListener, CalendarActivityListener, CalendarActivityDurationChangeListener, CalendarDisplayChangeListener, ContextInfoListener, CarouselSpinListener

Base class for creating a listener that can register with all our server-side faces events. The event type passed as a constructor parameter will determine what faces event the listener will act on. Concrete classes must implement the handleEvent method. The following events with associated listeners are supported:

Note: This abstract listener should support all faces events we provide in our component library. To add a new event, consider the following:

See Also:
handleEvent(javax.faces.event.FacesEvent)

Nested Class Summary
static class BasePolytypeListener.EventType
          These enumerations define the types of events this listener can process.

 

Constructor Summary
BasePolytypeListener(BasePolytypeListener.EventType eventType)
          Constructor requires an enumeration of BasePolytypeListener.EventType that defines what associated event this particular instance handles.

 

Method Summary
static boolean addListener(BasePolytypeListener listener, javax.faces.component.UIComponent component)
          Registers a poly type listener with the component.
protected  BasePolytypeListener.EventType getEventType()
          Gets the eventType from the state holder bean.
protected  org.apache.myfaces.trinidad.bean.FacesBean getFacesBean()
           
protected abstract  void handleEvent(javax.faces.event.FacesEvent event)
          Called passing in the target event of the registered event type.
protected  boolean isAppropriate(javax.faces.event.FacesEvent event)
          This method is similar to the isAppropriateListener you might find on a concrete instance of FacesEvent but this check is not if the listener implements an interface.
 boolean isTransient()
          Realization of StateHolder.
protected  void process(javax.faces.event.FacesEvent event)
          If the event matchings the target eventType then delecate to the handleEvent method.
 void processAction(javax.faces.event.ActionEvent event)
          The ActionListener implementation that resets input component values under the process root.
 void processCalendar(CalendarEvent event)
          The CalendarListener implementation that resets input component values under the process root.
 void processCalendarActivity(CalendarActivityEvent event)
          The CalendarActivityListener implementation that resets input component values under the process root.
 void processCalendarActivityDurationChange(CalendarActivityDurationChangeEvent event)
          The CalendarActivityDurationChangeListener implementation that resets input component values under the process root.
 void processCalendarDisplayChange(CalendarDisplayChangeEvent event)
          The CalendarDisplayChangeListener implementation that resets input component values under the process root.
 void processCarouselSpin(CarouselSpinEvent event)
          The CarouselSpinListener implementation that resets input component values under the process root.
 void processContextInfo(ContextInfoEvent event)
          The ContextInfoListener implementation that resets input component values under the process root.
 void processDataReturn(ReturnPopupDataEvent event)
          The ReturnPopupDataListener implementation that resets input component values under the process root.
 void processDialog(DialogEvent event)
          The DialogListener implementation that resets input component values under the process root.
 void processDisclosure(org.apache.myfaces.trinidad.event.DisclosureEvent event)
          The DisclosureListener implementation that resets input component values under the process root.
 void processDisclosure(org.apache.myfaces.trinidad.event.RowDisclosureEvent event)
          The RowDisclosureListener implementation that resets input component values under the process root.
 void processFocus(org.apache.myfaces.trinidad.event.FocusEvent event)
          The FocusListener implementation that resets input component values under the process root.
 void processLaunch(org.apache.myfaces.trinidad.event.LaunchEvent event)
          The LaunchListener implementation that resets input component values under the process root.
 void processLaunch(LaunchPopupEvent event)
          The LaunchPopupListener implementation that resets input component values under the process root.
 void processPoll(org.apache.myfaces.trinidad.event.PollEvent event)
          The PollListener implementation that resets input component values under the process root.
 void processPopupCanceled(PopupCanceledEvent event)
          The PopupCanceledListener implementation that resets input component values under the process root.
 void processPopupFetch(PopupFetchEvent event)
          The PopupFetchListener implementation that resets input component values under the process root.
 void processQuery(QueryEvent event)
          The QueryListener implementation that resets input component values under the process root.
 void processQueryOperation(QueryOperationEvent event)
          The QueryOperationListener implementation that resets input component values under the process root.
 void processRangeChange(org.apache.myfaces.trinidad.event.RangeChangeEvent event)
          The RangeChangeListener implementation that resets input component values under the process root.
 void processRegionNavigation(RegionNavigationEvent event)
          The RegionNavigationListener implementation that resets input component values under the process root.
 void processReturn(org.apache.myfaces.trinidad.event.ReturnEvent event)
          The ReturnListener implementation that resets input component values under the process root.
 void processReturn(ReturnPopupEvent event)
          The ReturnPopupListener implementation that resets input component values under the process root.
 void processSelection(org.apache.myfaces.trinidad.event.SelectionEvent event)
          The SelectionListener implementation that resets input component values under the process root.
 void processSort(org.apache.myfaces.trinidad.event.SortEvent event)
          The SortListener implementation that resets input component values under the process root.
 void processValueChange(javax.faces.event.ValueChangeEvent event)
          The ValueChangeListener implementation that resets input component values under the process root.
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object object)
          Restores the internal state into the faces bean.
 java.lang.Object saveState(javax.faces.context.FacesContext context)
          Saves the listener's state with the component tree.
protected  void setEventType(BasePolytypeListener.EventType eventType)
          Sets the eventType to the state holder bean.
 void setTransient(boolean isTransient)
          Realization of StateHolder.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

BasePolytypeListener

public BasePolytypeListener(BasePolytypeListener.EventType eventType)
Constructor requires an enumeration of BasePolytypeListener.EventType that defines what associated event this particular instance handles.
Parameters:
eventType - framework concrete event
Throws:
java.lang.IllegalArgumentException - eventType cannot be null

Method Detail

handleEvent

protected abstract void handleEvent(javax.faces.event.FacesEvent event)
Called passing in the target event of the registered event type. Subclasses should override this method to provide the specific implementation of this poly type listener. This method will only be called if the eventType passed as a constructor argument matches the target event.
Parameters:
event - faces event corresponding to the BasePolytypeListener.EventType passed via the constructor
See Also:
isAppropriate(javax.faces.event.FacesEvent)

getEventType

protected BasePolytypeListener.EventType getEventType()
Gets the eventType from the state holder bean.
Returns:
the eventType that defines the target event the listener should act on

setEventType

protected void setEventType(BasePolytypeListener.EventType eventType)
Sets the eventType to the state holder bean.
Parameters:
eventType - that defines the target event the listener should act on

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Saves the listener's state with the component tree. Realization of StateHolder.
Specified by:
saveState in interface javax.faces.component.StateHolder
Parameters:
context - faces context
Returns:
internal state managed by the faces bean

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object object)
Restores the internal state into the faces bean. Realization of StateHolder.
Specified by:
restoreState in interface javax.faces.component.StateHolder
Parameters:
context - faces context
object - internal state

isTransient

public boolean isTransient()
Realization of StateHolder.
Specified by:
isTransient in interface javax.faces.component.StateHolder
Returns:
always returns false

setTransient

public void setTransient(boolean isTransient)
Realization of StateHolder.
Specified by:
setTransient in interface javax.faces.component.StateHolder
Parameters:
isTransient -
Throws:
java.lang.UnsupportedOperationException - noop implementation

processAction

public final void processAction(javax.faces.event.ActionEvent event)
                         throws javax.faces.event.AbortProcessingException
The ActionListener implementation that resets input component values under the process root.
Specified by:
processAction in interface javax.faces.event.ActionListener
Parameters:
event - target action event
Throws:
javax.faces.event.AbortProcessingException - exception during processing event
See Also:
process(javax.faces.event.FacesEvent)

processDialog

public final void processDialog(DialogEvent event)
                         throws javax.faces.event.AbortProcessingException
The DialogListener implementation that resets input component values under the process root.
Specified by:
processDialog in interface DialogListener
Parameters:
event - target dialog event
Throws:
javax.faces.event.AbortProcessingException - exception during processing event
See Also:
process(javax.faces.event.FacesEvent)

processPopupCanceled

public final void processPopupCanceled(PopupCanceledEvent event)
                                throws javax.faces.event.AbortProcessingException
The PopupCanceledListener implementation that resets input component values under the process root.
Specified by:
processPopupCanceled in interface PopupCanceledListener
Parameters:
event - popup canceled event
Throws:
javax.faces.event.AbortProcessingException - exception during processing event
See Also:
process(javax.faces.event.FacesEvent)

processPopupFetch

public final void processPopupFetch(PopupFetchEvent event)
                             throws javax.faces.event.AbortProcessingException
The PopupFetchListener implementation that resets input component values under the process root.
Specified by:
processPopupFetch in interface PopupFetchListener
Parameters:
event - popup fetch event
Throws:
javax.faces.event.AbortProcessingException - exception during processing event
See Also:
process(javax.faces.event.FacesEvent)

processCalendar

public final void processCalendar(CalendarEvent event)
                           throws javax.faces.event.AbortProcessingException
The CalendarListener implementation that resets input component values under the process root.
Specified by:
processCalendar in interface CalendarListener
Parameters:
event - calendar event
Throws:
javax.faces.event.AbortProcessingException - exception during processing event
See Also:
process(javax.faces.event.FacesEvent)

processCalendarActivity

public final void processCalendarActivity(CalendarActivityEvent event)
                                   throws javax.faces.event.AbortProcessingException
The CalendarActivityListener implementation that resets input component values under the process root.
Specified by:
processCalendarActivity in interface CalendarActivityListener
Parameters:
event - calendar activity event
Throws:
javax.faces.event.AbortProcessingException - exception during processing event
See Also:
process(javax.faces.event.FacesEvent)

processCalendarActivityDurationChange

public final void processCalendarActivityDurationChange(CalendarActivityDurationChangeEvent event)
                                                 throws javax.faces.event.AbortProcessingException
The CalendarActivityDurationChangeListener implementation that resets input component values under the process root.
Specified by:
processCalendarActivityDurationChange in interface CalendarActivityDurationChangeListener
Parameters:
event - calendar activity duration change event
Throws:
javax.faces.event.AbortProcessingException - exception during processing event
See Also:
process(javax.faces.event.FacesEvent)

processCalendarDisplayChange

public final void processCalendarDisplayChange(CalendarDisplayChangeEvent event)
                                        throws javax.faces.event.AbortProcessingException
The CalendarDisplayChangeListener implementation that resets input component values under the process root.
Specified by:
processCalendarDisplayChange in interface CalendarDisplayChangeListener
Parameters:
event - calendar display change event
Throws:
javax.faces.event.AbortProcessingException - exception during processing event
See Also:
process(javax.faces.event.FacesEvent)

processCarouselSpin

public final void processCarouselSpin(CarouselSpinEvent event)
                               throws javax.faces.event.AbortProcessingException
The CarouselSpinListener implementation that resets input component values under the process root.
Specified by:
processCarouselSpin in interface CarouselSpinListener
Parameters:
event - carousel spin event
Throws:
javax.faces.event.AbortProcessingException - exception during processing event
See Also:
process(javax.faces.event.FacesEvent)

processContextInfo

public final void processContextInfo(ContextInfoEvent event)
                              throws javax.faces.event.AbortProcessingException
The ContextInfoListener implementation that resets input component values under the process root.
Specified by:
processContextInfo in interface ContextInfoListener
Parameters:
event - context info event
Throws:
javax.faces.event.AbortProcessingException - exception during processing event
See Also:
process(javax.faces.event.FacesEvent)

processDataReturn

public final void processDataReturn(ReturnPopupDataEvent event)
                             throws javax.faces.event.AbortProcessingException
The ReturnPopupDataListener implementation that resets input component values under the process root.
Specified by:
processDataReturn in interface ReturnPopupDataListener
Parameters:
event - LOV data return event
Throws:
javax.faces.event.AbortProcessingException - exception during processing event
See Also:
process(javax.faces.event.FacesEvent)

processDisclosure

public final void processDisclosure(org.apache.myfaces.trinidad.event.RowDisclosureEvent event)
                             throws javax.faces.event.AbortProcessingException
The RowDisclosureListener implementation that resets input component values under the process root.
Specified by:
processDisclosure in interface org.apache.myfaces.trinidad.event.RowDisclosureListener
Parameters:
event - row disclosure event
Throws:
javax.faces.event.AbortProcessingException - exception during processing event
See Also:
process(javax.faces.event.FacesEvent)

processDisclosure

public final void processDisclosure(org.apache.myfaces.trinidad.event.DisclosureEvent event)
                             throws javax.faces.event.AbortProcessingException
The DisclosureListener implementation that resets input component values under the process root.
Specified by:
processDisclosure in interface org.apache.myfaces.trinidad.event.DisclosureListener
Parameters:
event - disclosure event
Throws:
javax.faces.event.AbortProcessingException - exception during processing event
See Also:
process(javax.faces.event.FacesEvent)

processFocus

public final void processFocus(org.apache.myfaces.trinidad.event.FocusEvent event)
                        throws javax.faces.event.AbortProcessingException
The FocusListener implementation that resets input component values under the process root.
Specified by:
processFocus in interface org.apache.myfaces.trinidad.event.FocusListener
Parameters:
event - focus event
Throws:
javax.faces.event.AbortProcessingException - exception during processing event
See Also:
process(javax.faces.event.FacesEvent)

processLaunch

public final void processLaunch(org.apache.myfaces.trinidad.event.LaunchEvent event)
                         throws javax.faces.event.AbortProcessingException
The LaunchListener implementation that resets input component values under the process root.
Specified by:
processLaunch in interface org.apache.myfaces.trinidad.event.LaunchListener
Parameters:
event - dialog framework launch event
Throws:
javax.faces.event.AbortProcessingException - exception during processing event
See Also:
process(javax.faces.event.FacesEvent)

processLaunch

public final void processLaunch(LaunchPopupEvent event)
                         throws javax.faces.event.AbortProcessingException
The LaunchPopupListener implementation that resets input component values under the process root.
Specified by:
processLaunch in interface LaunchPopupListener
Parameters:
event - LOV popup launch event
Throws:
javax.faces.event.AbortProcessingException - exception during processing event
See Also:
process(javax.faces.event.FacesEvent)

processPoll

public final void processPoll(org.apache.myfaces.trinidad.event.PollEvent event)
                       throws javax.faces.event.AbortProcessingException
The PollListener implementation that resets input component values under the process root.
Specified by:
processPoll in interface org.apache.myfaces.trinidad.event.PollListener
Parameters:
event - poll event
Throws:
javax.faces.event.AbortProcessingException - exception during processing event
See Also:
process(javax.faces.event.FacesEvent)

processQuery

public final void processQuery(QueryEvent event)
                        throws javax.faces.event.AbortProcessingException
The QueryListener implementation that resets input component values under the process root.
Specified by:
processQuery in interface QueryListener
Parameters:
event - query event
Throws:
javax.faces.event.AbortProcessingException - exception during processing event
See Also:
process(javax.faces.event.FacesEvent)

processQueryOperation

public final void processQueryOperation(QueryOperationEvent event)
                                 throws javax.faces.event.AbortProcessingException
The QueryOperationListener implementation that resets input component values under the process root.
Specified by:
processQueryOperation in interface QueryOperationListener
Parameters:
event - query event
Throws:
javax.faces.event.AbortProcessingException - exception during processing event
See Also:
process(javax.faces.event.FacesEvent)

processRangeChange

public final void processRangeChange(org.apache.myfaces.trinidad.event.RangeChangeEvent event)
                              throws javax.faces.event.AbortProcessingException
The RangeChangeListener implementation that resets input component values under the process root.
Specified by:
processRangeChange in interface org.apache.myfaces.trinidad.event.RangeChangeListener
Parameters:
event - range change event
Throws:
javax.faces.event.AbortProcessingException - exception during processing event
See Also:
process(javax.faces.event.FacesEvent)

processRegionNavigation

public final void processRegionNavigation(RegionNavigationEvent event)
                                   throws javax.faces.event.AbortProcessingException
The RegionNavigationListener implementation that resets input component values under the process root.
Specified by:
processRegionNavigation in interface RegionNavigationListener
Parameters:
event - region navigation
Throws:
javax.faces.event.AbortProcessingException - exception during processing event
See Also:
process(javax.faces.event.FacesEvent)

processReturn

public final void processReturn(org.apache.myfaces.trinidad.event.ReturnEvent event)
                         throws javax.faces.event.AbortProcessingException
The ReturnListener implementation that resets input component values under the process root.
Specified by:
processReturn in interface org.apache.myfaces.trinidad.event.ReturnListener
Parameters:
event - dialog return event
Throws:
javax.faces.event.AbortProcessingException - exception during processing event
See Also:
process(javax.faces.event.FacesEvent)

processReturn

public final void processReturn(ReturnPopupEvent event)
                         throws javax.faces.event.AbortProcessingException
The ReturnPopupListener implementation that resets input component values under the process root.
Specified by:
processReturn in interface ReturnPopupListener
Parameters:
event - LOV popup return event
Throws:
javax.faces.event.AbortProcessingException - exception during processing event
See Also:
process(javax.faces.event.FacesEvent)

processSelection

public final void processSelection(org.apache.myfaces.trinidad.event.SelectionEvent event)
                            throws javax.faces.event.AbortProcessingException
The SelectionListener implementation that resets input component values under the process root.
Specified by:
processSelection in interface org.apache.myfaces.trinidad.event.SelectionListener
Parameters:
event - selection event
Throws:
javax.faces.event.AbortProcessingException - exception during processing event
See Also:
process(javax.faces.event.FacesEvent)

processSort

public final void processSort(org.apache.myfaces.trinidad.event.SortEvent event)
                       throws javax.faces.event.AbortProcessingException
The SortListener implementation that resets input component values under the process root.
Specified by:
processSort in interface org.apache.myfaces.trinidad.event.SortListener
Parameters:
event - sort event
Throws:
javax.faces.event.AbortProcessingException - exception during processing event
See Also:
process(javax.faces.event.FacesEvent)

processValueChange

public final void processValueChange(javax.faces.event.ValueChangeEvent event)
                              throws javax.faces.event.AbortProcessingException
The ValueChangeListener implementation that resets input component values under the process root.
Specified by:
processValueChange in interface javax.faces.event.ValueChangeListener
Parameters:
event - value change event
Throws:
javax.faces.event.AbortProcessingException - exception during processing event
See Also:
process(javax.faces.event.FacesEvent)

isAppropriate

protected boolean isAppropriate(javax.faces.event.FacesEvent event)
This method is similar to the isAppropriateListener you might find on a concrete instance of FacesEvent but this check is not if the listener implements an interface. This one listener can work with several event types. The BasePolytypeListener.EventType enumeration passed to the constructor is associated with an event class. If the event's class is the same as the event class established via the constructor, processing is invoked.
Parameters:
event - target
Returns:
returns true if the event should be processed by the listener
See Also:
process(javax.faces.event.FacesEvent)

process

protected void process(javax.faces.event.FacesEvent event)
If the event matchings the target eventType then delecate to the handleEvent method.
Parameters:
event - faces event
See Also:
isAppropriate(javax.faces.event.FacesEvent), handleEvent(javax.faces.event.FacesEvent)

addListener

public static boolean addListener(BasePolytypeListener listener,
                                  javax.faces.component.UIComponent component)
Registers a poly type listener with the component. If the component supports the listener based on the event type, a true value is returned. Otherwise; if the component does not support this event, false is returned.
Parameters:
listener - concrete poly type listener
component - to add the target listener
Returns:
true if the listener was successfully added
Throws:
java.lang.IllegalArgumentException - listener cannot be null; component cannot be null

getFacesBean

protected org.apache.myfaces.trinidad.bean.FacesBean getFacesBean()
Returns:
the state holder for the stateful listener

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 2 (11.1.2.2.0)
E17488-03


Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.