Class CollectionBaseAction
- All Implemented Interfaces:
IAction,IChangeModeAction,IModuleContextAction,IRequestAction
- Direct Known Subclasses:
CreateNewElementInManyToManyCollectionAction,CutElementsFromCollectionAction,DeleteSelectedInCollectionBaseAction,MoveMyReportColumnAction,OnSelectElementBaseAction,RemoveMyReportColumnAction,RemoveSelectedTreeViewNodeAction
That is in <list-action/> of <collection-view/> or
in @ListAction annotation.
- 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 TypeMethodDescriptionA list of selected collection element when each element is a map with the values of the collection element.A list of all collection element when each element is a map with the values of the collection element.protected ListA list of all objects (POJOs or EntityBeans) in the collection.intgetRow()This property has value when the action has been clicked from the row.protected Map[]Keys of the selected collection element.protected ListA list of selected objects (POJOs or EntityBeans) in the collection.voidsetRow(int row) Methods inherited from class org.openxava.actions.CollectionElementViewBaseAction
closeDialog, execute, 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
-
CollectionBaseAction
public CollectionBaseAction()
-
-
Method Details
-
getMapValues
A list of all collection element when each element is a map with the values of the collection element.The values only include the displayed data in the row.
- Returns:
- Of type Map. Never null.
- Throws:
XavaException
-
getMapsSelectedValues
A list of selected collection element when each element is a map with the values of the collection element.If
rowproperty has value it returns the resulting list will contain the value of that row only.
The values only include the displayed data in the row.- Returns:
- Of type Map. Never null.
- Throws:
XavaException
-
getSelectedKeys
Keys of the selected collection element.If
rowproperty has value it returns the resulting list will contain the value of that row only.
The result is a Map with the key of each selected row, with the exception of @ElementCollection that returns all the displayed values of each selected row.- Returns:
- Never null.
- Throws:
XavaException- Since:
- 6.0.2
-
getObjects
A list of all objects (POJOs or EntityBeans) in the collection.Generally the objects are POJOs, although if you use EJBPersistenceProvider the they will be EntityBeans (of EJB2).
- Returns:
- Never null.
- Throws:
RemoteExceptionjavax.ejb.FinderExceptionXavaException
-
getSelectedObjects
protected List getSelectedObjects() throws RemoteException, javax.ejb.FinderException, XavaExceptionA list of selected objects (POJOs or EntityBeans) in the collection.Generally the objects are POJOs, although if you use EJBPersistenceProvider the they will be EntityBeans (of EJB2).
Ifrowproperty has value it returns the resulting list will contain the object of that row only.- Returns:
- Never null.
- Throws:
RemoteExceptionjavax.ejb.FinderExceptionXavaException
-
setRow
public void setRow(int row) -
getRow
public int getRow()This property has value when the action has been clicked from the row.If not its value is -1.
-