Package org.openxava.actions
Class SaveElementInCollectionAction
java.lang.Object
org.openxava.actions.BaseAction
org.openxava.actions.ViewBaseAction
org.openxava.actions.CollectionElementViewBaseAction
org.openxava.actions.SaveElementInCollectionAction
- All Implemented Interfaces:
IAction,IChangeModeAction,IModuleContextAction,IRequestAction
- Direct Known Subclasses:
AddElementsToCollectionAction,PasteElementsIntoCollectionAction,SaveElementInTreeViewAction
To save a collection element.
The case of collections of entities with @AsEmbedded (or with as-aggregate="true")
is treated by AddElementsToCollectionAction.
- Author:
- Javier Paniza, Jeromy Altuna
-
Field Summary
Fields inherited from interface org.openxava.actions.IChangeModeAction
DETAIL, LIST, PREVIOUS_MODE, SPLIT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidassociateEntity(Map keyValues) protected voidvoidexecute()protected Mapprotected voidsaveCollectionElement(Map containerKey) Saves the collection or aggregate.protected MapsaveIfNotExists(View view) Methods inherited from class org.openxava.actions.CollectionElementViewBaseAction
closeDialog, getCollectionElementView, getCollectionLabel, getMetaCollection, getMetaCollectionView, getParentView, getView, getViewObject, isCloseDialogDisallowed, isEntityReferencesCollection, isEntityReferencesCollection, mustRefreshCollection, setCloseDialogDisallowed, setViewObject, showDialog, validateMaximum, validateMinimumMethods inherited from class org.openxava.actions.ViewBaseAction
changeThisPropertyByViewValue, getModelName, getPreviousView, getPreviousViews, resetDescriptionsCache, returnToPreviousView, setControllers, setPreviousViews, setView, 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
-
SaveElementInCollectionAction
public SaveElementInCollectionAction()
-
-
Method Details
-
execute
- Specified by:
executein interfaceIAction- Specified by:
executein classCollectionElementViewBaseAction- Throws:
Exception
-
getValuesToSave
- Throws:
Exception
-
saveCollectionElement
Saves the collection or aggregate.- Parameters:
containerKey-- Throws:
Exception- Since:
- 4.7
-
create
protected void create(Map values, boolean isEntity, Map containerKey) throws javax.ejb.CreateException - Throws:
javax.ejb.CreateException
-
associateEntity
protected void associateEntity(Map keyValues) throws ValidationException, XavaException, javax.ejb.ObjectNotFoundException, javax.ejb.FinderException, RemoteException - Throws:
ValidationExceptionXavaExceptionjavax.ejb.ObjectNotFoundExceptionjavax.ejb.FinderExceptionRemoteException
-
saveIfNotExists
- Returns:
- The saved object
- Throws:
Exception
-
addValidationMessage
- Since:
- 5.9
-
getNextAction
- Throws:
Exception
-