Skip navigation links

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


oracle.adf.view.rich.event
Class ResetListener

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

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

public class ResetListener
extends BasePolytypeListener
implements javax.faces.component.StateHolder

The resetListener declarative way to reset input component's submitted values. It is a generalized version of the resetActionListener and should be used in its place. Use the type attribute to select the event the listener should be activated on. All values submitted will be reset to null or empty, and all editable components will be updated with the current values of the model on the server. The reset will not alter any model state directly.

JSF validation is the third lifecycle phase and proceeds the apply request values phase. During the apply request values phase, input components set their submitted value as a property of the input component. The submitted value is kept by the component until after it has been validated. If validation fails, the JSF lifecycle is short-circuited to the render response phase. The submitted value is returned to the client along with associated faces messages.

This listener should be used primarily in situations that use partial page submits. There are times that the submitted values needs to be cleared. Another common use is with an af:popup. This listener be configured to reset the content of a popup by using the "popupFetch", "popupCanceled" or "dialog" event types. The listener will find the event's process root and traverse down through that subtree resetting input components. An event's process root defines an area of the page that an event should act on. Some of the more common components that are defined as process roots includes: form, subform, region, and popup.


Nested Class Summary

 

Nested classes/interfaces inherited from class oracle.adf.view.rich.event.BasePolytypeListener
BasePolytypeListener.EventType

 

Constructor Summary
ResetListener()
          The no-args constructor default type is BasePolytypeListener.EventType.ACTION.
ResetListener(BasePolytypeListener.EventType eventType)
          Constructor requires an enumeration of BasePolytypeListener.EventTypethat defines what associated event this particular instance handles.

 

Method Summary
protected  void handleEvent(javax.faces.event.FacesEvent event)
          The event is approprate for the originating BasePolytypeListener.EventType.

 

Methods inherited from class oracle.adf.view.rich.event.BasePolytypeListener
addListener, getEventType, getFacesBean, isAppropriate, isTransient, process, processAction, processCalendar, processCalendarActivity, processCalendarActivityDurationChange, processCalendarDisplayChange, processCarouselSpin, processContextInfo, processDataReturn, processDialog, processDisclosure, processDisclosure, processFocus, processLaunch, processLaunch, processPoll, processPopupCanceled, processPopupFetch, processQuery, processQueryOperation, processRangeChange, processRegionNavigation, processReturn, processReturn, processSelection, processSort, processValueChange, restoreState, saveState, setEventType, setTransient

 

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

 

Methods inherited from interface javax.faces.component.StateHolder
isTransient, restoreState, saveState, setTransient

 

Constructor Detail

ResetListener

public ResetListener()
The no-args constructor default type is BasePolytypeListener.EventType.ACTION.

ResetListener

public ResetListener(BasePolytypeListener.EventType eventType)
Constructor requires an enumeration of BasePolytypeListener.EventTypethat defines what associated event this particular instance handles.
Parameters:
eventType - framework concrete event

Method Detail

handleEvent

protected void handleEvent(javax.faces.event.FacesEvent event)
The event is approprate for the originating BasePolytypeListener.EventType. Find the event source of the component and then locate the processing root for the event. Next, reset all editable values holders under the target event process root.
Specified by:
handleEvent in class BasePolytypeListener
Parameters:
event - target faces event to handle
See Also:
BasePolytypeListener.isAppropriate(javax.faces.event.FacesEvent)

Skip navigation links

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


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