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.context
Class DirtyPageHandler

java.lang.Object
  extended by oracle.adf.view.rich.context.DirtyPageHandler


public abstract class DirtyPageHandler
extends java.lang.Object

META_INF/services-based application-scoped object for tracking whether navigation will result in data loss. Only a single implementation may be registered per application. Registering multiple implementations will result in an IllegalStateException at applciation initialization. If no implementation is registered, a default implementation will be used. That implementation will always return false from isDataDirty and will do nothing in response to a trackNavigation call.


Nested Class Summary
static class DirtyPageHandler.DirtyPageContext
          Context class passed to the DirtyPageHandler's trackNavigation when DirtyPageHandler needs to track navigation and call confirmNavigation when a navigation will result in the loss of uncommitted data
static class DirtyPageHandler.UncommittedDataWarning
          Possible Uncommitted Data warning configuration options

 

Constructor Summary
DirtyPageHandler()
           

 

Method Summary
 DirtyPageHandler.UncommittedDataWarning getUncommittedDataWarning()
          Returns a default value for the Uncommitted Data Warning configuration option
 boolean isDataDirty()
          Called by the view during the RenderResponse phase to determine whether the page being rendered contains uncommitted data.
 void navigationCanceled(java.lang.String confirmationToken)
          Called by the view when the user has canceled a navigation that could result in data loss.
 void navigationConfirmed(java.lang.String confirmationToken)
          Called by the view when the user has confirmed a navigation that could result in data loss.
 void trackNavigation(DirtyPageHandler.DirtyPageContext dirtyContext)
          Called by the view once per request before the InvokeApplication phase to indicate whether the DirtyHandler should track navigation for this request.

 

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

 

Constructor Detail

DirtyPageHandler

public DirtyPageHandler()

Method Detail

getUncommittedDataWarning

public DirtyPageHandler.UncommittedDataWarning getUncommittedDataWarning()
Returns a default value for the Uncommitted Data Warning configuration option
Returns:
configuration option

isDataDirty

public boolean isDataDirty()
Called by the view during the RenderResponse phase to determine whether the page being rendered contains uncommitted data. If it does, the view may warn the user if the user attempts to navigate off of the current page.
Returns:
true if the current page contains uncommitted data.

trackNavigation

public void trackNavigation(DirtyPageHandler.DirtyPageContext dirtyContext)
Called by the view once per request before the InvokeApplication phase to indicate whether the DirtyHandler should track navigation for this request. If dirtyContext is non-null, navigation should be tracked and DirtyPageContext.confirmNavigation should be called when a navigation is going to result in the loss of uncommitted data.
Parameters:
dirtyContext -
See Also:
DirtyPageHandler.DirtyPageContext

navigationConfirmed

public void navigationConfirmed(java.lang.String confirmationToken)
Called by the view when the user has confirmed a navigation that could result in data loss. The confirmationToken previously returned by the DirtyPageHandler is passed in so that the DiryPageHandler can restore any necessary state. The DirtyPageHandler is expected to proceed with the operation that caused the DirtyPageHandler to initially call DirtyPageContext.confirmNavigation.
See Also:
DirtyPageHandler.DirtyPageContext.confirmNavigation(java.lang.String)

navigationCanceled

public void navigationCanceled(java.lang.String confirmationToken)
Called by the view when the user has canceled a navigation that could result in data loss. The confirmationToken previously returned by the DirtyPageHandler is passed in so that the DiryPageHandler can clean up any saved state.
See Also:
DirtyPageHandler.DirtyPageContext.confirmNavigation(java.lang.String)

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.