Class AbstractOnSaveAction
java.lang.Object
net.sf.basedb.clients.web.extensions.edit.AbstractOnSaveAction
- All Implemented Interfaces:
OnSaveAction
,Action
- Direct Known Subclasses:
DebugOnSaveActionFactory.DebugOnSaveAction
Abstract base implementation of the OnSaveAction interface.
This contains empty method stubs for all interface methods.
It is recommended for subclasses to extend this class to
avoid problems in the future if new methods are added to
the interface.
- Since:
- 2.17
- Author:
- Nicklas
- Last modified
- $Date: 2010-11-15 13:53:05 +0100 (må, 15 nov 2010) $
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
Create a on-save action without a contextprotected
AbstractOnSaveAction
(JspContext jspContext) Create a on-save action with a jsp context. -
Method Summary
Modifier and TypeMethodDescriptionprotected JspContext
Set the JSP context of the current invokation.void
onCommit()
This event is fired after a successful commit.void
onRollback
(Exception ex) This event is fired after an error that caused the save action to rollback.void
onSave()
This event is fired first to let the action do something with the current item.protected void
setJspContext
(JspContext jspContext) Get the JSP context of the current invokation.
-
Field Details
-
jspContext
-
-
Constructor Details
-
AbstractOnSaveAction
protected AbstractOnSaveAction()Create a on-save action without a context -
AbstractOnSaveAction
Create a on-save action with a jsp context.
-
-
Method Details
-
onSave
public void onSave()Description copied from interface:OnSaveAction
This event is fired first to let the action do something with the current item. Implementors may throw an exception from this method to indicate that something went wrong. If so, any remaining extensions will be unprocessed and theOnSaveAction.onRollback(Exception)
is called.- Specified by:
onSave
in interfaceOnSaveAction
-
onCommit
public void onCommit()Description copied from interface:OnSaveAction
This event is fired after a successful commit. Implementors should not throw any exceptions from this method since it may confuse users to see error messages and may cause other extensions to not be called.- Specified by:
onCommit
in interfaceOnSaveAction
-
onRollback
Description copied from interface:OnSaveAction
This event is fired after an error that caused the save action to rollback. Implementors should not throw any exceptions from this method since it may hide original exception and may cause other extensions to not be called.- Specified by:
onRollback
in interfaceOnSaveAction
- Parameters:
ex
- The exception that caused the transaction to rollback
-
setJspContext
Get the JSP context of the current invokation. Can be null if no context has been set in the constructor or the setter method. -
getJspContext
Set the JSP context of the current invokation.
-