Package org.openxava.actions
Class SaveAction
java.lang.Object
org.openxava.actions.BaseAction
org.openxava.actions.ViewBaseAction
org.openxava.actions.TabBaseAction
org.openxava.actions.SaveAction
- All Implemented Interfaces:
IAction,IChangeModeAction,IModuleContextAction,IRequestAction
- Author:
- Javier Paniza
-
Field Summary
Fields inherited from interface org.openxava.actions.IChangeModeAction
DETAIL, LIST, PREVIOUS_MODE, SPLIT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Mapcreate()voidexecute()protected Collection<String>Properties which values will display at the end of the message "{Entity} created successfully".protected MapbooleanIf false after save does not refresh the form from database.booleanIf true reset the form after save, else refresh the form from database displayed the recently saved data.booleanIf true reset the form after save for creating, else refresh the form from database displayed the recently saved data.booleanIf true reset the form after save for modifying, else refresh the form from database displayed the recently saved data.protected Mapmodify()voidsetRefreshAfter(boolean refreshAfter) If false after save does not refresh the form from database.voidsetResetAfter(boolean b) If true reset the form after save, else refresh the form from database displayed the recently saved data.voidsetResetAfterOnCreate(boolean resetAfterOnCreate) If true reset the form after save for creating, else refresh the form from database displayed the recently saved data.voidsetResetAfterOnModify(boolean resetAfterOnModify) If true reset the form after save for modifying, else refresh the form from database displayed the recently saved data.protected voidupdateView(Map values, boolean resetAfter) Methods inherited from class org.openxava.actions.TabBaseAction
getCollection, getRow, getSelected, getSelectedKeys, getTab, setCollection, setRow, setViewObjectMethods inherited from class org.openxava.actions.ViewBaseAction
changeThisPropertyByViewValue, closeDialog, getModelName, getPreviousView, getPreviousViews, getView, resetDescriptionsCache, returnToPreviousView, setControllers, setPreviousViews, setView, showDialog, showDialog, showNewView, showView, validateViewValuesMethods inherited from class org.openxava.actions.BaseAction
addActions, addError, addErrors, addInfo, addMessage, addMessages, addWarning, clearActions, commit, executeAction, executeAfter, executeBefore, getContext, getEnvironment, getErrors, getLocale, getManager, getMessages, getNextMode, getQualifiedActionIfAvailable, getRequest, removeActions, returnToPreviousControllers, rollback, setContext, setDefaultControllers, setEnvironment, setErrors, setMessages, setNextMode, setRequest
-
Constructor Details
-
SaveAction
public SaveAction()
-
-
Method Details
-
execute
- Throws:
Exception
-
updateView
-
modify
- Throws:
Exception
-
create
- Throws:
Exception
-
getPropertiesToShowInEntityCreatedMessage
Properties which values will display at the end of the message "{Entity} created successfully".
Displaying the key in the message does not always apply. The default implementation is pretty good, but you can overwrite this method to define your own properties or just return null to not show any property.- Returns:
- The properties to show or null to not show any property
- Throws:
Exception- Since:
- 7.0.4
-
getValuesToSave
- Throws:
Exception
-
isResetAfter
public boolean isResetAfter()If true reset the form after save, else refresh the form from database displayed the recently saved data.The default value is true.
-
setResetAfter
public void setResetAfter(boolean b) If true reset the form after save, else refresh the form from database displayed the recently saved data.The default value is true.
-
isRefreshAfter
public boolean isRefreshAfter()If false after save does not refresh the form from database.It only has effect if resetAfter is false. The default value is true.
- Since:
- 4.8
-
setRefreshAfter
public void setRefreshAfter(boolean refreshAfter) If false after save does not refresh the form from database.It only has effect if resetAfter is false. The default value is true.
- Since:
- 4.8
-
isResetAfterOnCreate
public boolean isResetAfterOnCreate()If true reset the form after save for creating, else refresh the form from database displayed the recently saved data.The default value is true.
- Since:
- 5.8
-
setResetAfterOnCreate
public void setResetAfterOnCreate(boolean resetAfterOnCreate) If true reset the form after save for creating, else refresh the form from database displayed the recently saved data.The default value is true.
- Since:
- 5.8
-
isResetAfterOnModify
public boolean isResetAfterOnModify()If true reset the form after save for modifying, else refresh the form from database displayed the recently saved data.The default value is true.
- Since:
- 5.8
-
setResetAfterOnModify
public void setResetAfterOnModify(boolean resetAfterOnModify) If true reset the form after save for modifying, else refresh the form from database displayed the recently saved data.The default value is true.
- Since:
- 5.8
-