public abstract class DirtyPageHandler extends Object
false from isDataDirty and will do nothing in response to a trackNavigation call.| Modifier and Type | Class and Description |
|---|---|
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 and Description |
|---|
DirtyPageHandler() |
| Modifier and Type | Method and Description |
|---|---|
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(String confirmationToken)
Called by the view when the user has canceled a navigation that could result in data loss.
|
void |
navigationConfirmed(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.
|
public DirtyPageHandler.UncommittedDataWarning getUncommittedDataWarning()
public boolean isDataDirty()
true if the current page contains uncommitted data.public void trackNavigation(DirtyPageHandler.DirtyPageContext dirtyContext)
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.dirtyContext - the dirty context.DirtyPageHandler.DirtyPageContextpublic void navigationConfirmed(String confirmationToken)
DirtyPageContext.confirmNavigation.confirmationToken - the confirmation token.DirtyPageHandler.DirtyPageContext.confirmNavigation(java.lang.String)public void navigationCanceled(String confirmationToken)
confirmationToken - the confirmation token.DirtyPageHandler.DirtyPageContext.confirmNavigation(java.lang.String)