Class SearchByViewKeyAction

All Implemented Interfaces:
IAction, IChangeModeAction, IModuleContextAction, IRequestAction
Direct Known Subclasses:
SearchExecutingOnChangeAction, SearchReadOnlyAction

public class SearchByViewKeyAction extends ViewBaseAction
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
  • Constructor Details

    • SearchByViewKeyAction

      public SearchByViewKeyAction()
  • Method Details

    • execute

      public void execute() throws Exception
      Throws:
      Exception
    • setValuesToView

      protected void setValuesToView(Map values) throws Exception
      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

      protected Map getMemberNames() throws Exception
      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

      protected Map getValuesFromView() throws Exception
      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

      protected Map getKeyValuesFromView() throws Exception
      Key values obtained from the view, used to do a search by key.

      By default assumed key data in the view.

      Throws:
      Exception