Package org.openxava.actions
Class SearchByViewKeyAction
java.lang.Object
org.openxava.actions.BaseAction
org.openxava.actions.ViewBaseAction
org.openxava.actions.SearchByViewKeyAction
- All Implemented Interfaces:
IAction,IChangeModeAction,IModuleContextAction,IRequestAction
- Direct Known Subclasses:
SearchExecutingOnChangeAction,SearchReadOnlyAction
Search using as key the data displayed in the view.
First try to use the key value, if they are filled, otherwise uses the values of any properties filled for searching the data, and return the first matched object.
You can refine the behaviour of this action extending it and overwrite its protected methods.
- Author:
- Javier Paniza, Ana Andrés
-
Field Summary
Fields inherited from interface org.openxava.actions.IChangeModeAction
DETAIL, LIST, PREVIOUS_MODE, SPLIT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()protected MapKey values obtained from the view, used to do a search by key.protected MapNames of the members to be retrieve from object model (at the end from database).protected MapValues obtained from the view, used to do a search by any filled value.protected voidsetValuesToView(Map values) Executed after searching is done, in order to assign the searched values to the view.Methods 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
-
SearchByViewKeyAction
public SearchByViewKeyAction()
-
-
Method Details
-
execute
- Throws:
Exception
-
setValuesToView
Executed after searching is done, in order to assign the searched values to the view.- Parameters:
values- The values to assign to the view- Throws:
Exception- If some is wrong.
-
getMemberNames
Names of the members to be retrieve from object model (at the end from database).By default, they are the members shown by the view.
- Throws:
Exception
-
getValuesFromView
Values obtained from the view, used to do a search by any filled value.By default assumed all data currently displayed to the user.
- Throws:
Exception
-
getKeyValuesFromView
Key values obtained from the view, used to do a search by key.By default assumed key data in the view.
- Throws:
Exception
-