org.openxava.actions
Class CollectionBaseAction

java.lang.Object
  extended by org.openxava.actions.BaseAction
      extended by org.openxava.actions.ViewBaseAction
          extended by org.openxava.actions.CollectionElementViewBaseAction
              extended by org.openxava.actions.CollectionBaseAction
All Implemented Interfaces:
IAction, IChangeModeAction, IModuleContextAction, IRequestAction
Direct Known Subclasses:
CreateNewElementInManyToManyCollectionAction, OnSelectElementBaseAction, RemoveSelectedInCollectionAction, RemoveSelectedTreeViewNodeAction

public abstract class CollectionBaseAction
extends CollectionElementViewBaseAction

Base class for creating actions to be used as list actions.

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
CollectionBaseAction()
           
 
Method Summary
protected  java.util.List getMapsSelectedValues()
          A list of selected collection element when each element is a map with the values of the collection element.
protected  java.util.List getMapValues()
          A list of all collection element when each element is a map with the values of the collection element.
protected  java.util.List getObjects()
          A list of all objects (POJOs or EntityBeans) in the collection.
 int getRow()
          This property has value when the action has been clicked from the row.
protected  java.util.List getSelectedObjects()
          A list of selected objects (POJOs or EntityBeans) in the collection.
 void setRow(int row)
           
 
Methods inherited from class org.openxava.actions.CollectionElementViewBaseAction
closeDialog, execute, getCollectionElementView, getParentView, getView, getViewObject, isCloseDialogDisallowed, isEntityReferencesCollection, setCloseDialogDisallowed, setViewObject, showDialog
 
Methods inherited from class org.openxava.actions.ViewBaseAction
getModelName, getPreviousView, getPreviousViews, resetDescriptionsCache, returnToPreviousView, setControllers, setPreviousViews, setView, showDialog, showNewView, showView
 
Methods inherited from class org.openxava.actions.BaseAction
addActions, addError, addErrors, addInfo, addMessage, addMessages, addWarning, clearActions, executeAfter, executeBefore, getContext, getEnvironment, getErrors, getLocale, getManager, getMessages, getNextMode, getRequest, removeActions, returnToPreviousControllers, setContext, setDefaultControllers, setEnvironment, setErrors, setMessages, setNextMode, setRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionBaseAction

public CollectionBaseAction()
Method Detail

getMapValues

protected java.util.List getMapValues()
                               throws XavaException
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

protected java.util.List getMapsSelectedValues()
                                        throws XavaException
A list of selected collection element when each element is a map with the values of the collection element.

If row property 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

getObjects

protected java.util.List getObjects()
                             throws java.rmi.RemoteException,
                                    FinderException,
                                    XavaException
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:
java.rmi.RemoteException
FinderException
XavaException

getSelectedObjects

protected java.util.List getSelectedObjects()
                                     throws java.rmi.RemoteException,
                                            FinderException,
                                            XavaException
A 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).
If row property has value it returns the resulting list will contain the object of that row only.

Returns:
Never null.
Throws:
java.rmi.RemoteException
FinderException
XavaException

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.