public class SearchByViewKeyAction extends ViewBaseAction
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.
DETAIL, LIST, PREVIOUS_MODE, SPLIT
Constructor and Description |
---|
SearchByViewKeyAction() |
Modifier and Type | Method and Description |
---|---|
void |
execute() |
protected java.util.Map |
getKeyValuesFromView()
Key values obtained from the view, used to do a search by key.
|
protected java.util.Map |
getMemberNames()
Names of the members to be retrieve from object model (at the end from database).
|
protected java.util.Map |
getValuesFromView()
Values obtained from the view, used to do a search by any filled value.
|
protected void |
setValuesToView(java.util.Map values)
Executed after searching is done, in order to assign the searched
values to the view.
|
closeDialog, getModelName, getPreviousView, getPreviousViews, getView, resetDescriptionsCache, returnToPreviousView, setControllers, setPreviousViews, setView, showDialog, showDialog, showNewView, showView, validateViewValues
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
public void execute() throws java.lang.Exception
java.lang.Exception
protected void setValuesToView(java.util.Map values) throws java.lang.Exception
values
- The values to assign to the viewjava.lang.Exception
- If some is wrong.protected java.util.Map getMemberNames() throws java.lang.Exception
By default, they are the members shown by the view.
java.lang.Exception
protected java.util.Map getValuesFromView() throws java.lang.Exception
By default assumed all data currently displayed to the user.
java.lang.Exception
protected java.util.Map getKeyValuesFromView() throws java.lang.Exception
By default assumed key data in the view.
java.lang.Exception