Class AbstractFindIndexListActionSupport<M extends Serializable,T extends Serializable,F extends AbstractForm>

Type Parameters:
M - Record type of master list cache if loading a slave list or NA otherwise.
T - Record type of list cache.
F - Type of form used by this action or NullForm if forms aren't used.
All Implemented Interfaces:
Action, ValidationAware, LocaleProvider, ModelDriven<F>, TextProvider, Validateable, Serializable, BrowserTabAware, BrowserTabAware2, FormDriven<F>, LoggingAware, ValidationAware2, Action, ServletRequestAware, ValidationAware, ModelDriven<F>, Validateable

public abstract class AbstractFindIndexListActionSupport<M extends Serializable,T extends Serializable,F extends AbstractForm> extends AbstractFormDrivenActionSupport<F>

Template class for creating Command objects that load an index-based list in the ListCache used by the target, viewer action.

Concrete subclasses must implement getFindIndexListConfig(), which defines the list being displayed from the ListCache and a list index. Subclasses will override getFindCommand(M) to generate a Command object that implements ListSizeFinder and PageByIndexRangeFinder.

See Also:
  • Constructor Details

    • AbstractFindIndexListActionSupport

      public AbstractFindIndexListActionSupport()
  • Method Details

    • getFindCommand

      protected abstract AbstractFindIndexListActionSupport.FindIndexListResponse<M,T> getFindCommand(M selectedMaster) throws Exception
      Overridden by subclasses to return Command object for retrieving list (configured with any search parameters) and forwarding in the case of success.
      Parameters:
      selectedMaster - Selected record of master list or null if loading master list.
      Throws:
      Exception
    • getFindIndexListConfig

      protected abstract AbstractFindIndexListActionSupport.FindIndexListConfig getFindIndexListConfig()
      Written by subclasses to configure behaviour of find action.
    • getListCache

      protected abstract ListCache<M,?,T> getListCache()
      Written by subclasses to return list cache that is being populated.
    • getMasterListCache

      protected abstract ListCache<?,?,M> getMasterListCache()
      Written by subclasses to return master list cache or null if the list cache is the master list.
    • translateFinderException

      protected String translateFinderException(ListSizeFinder<M> sizeFinderCommand, Exception e)
      May be overridden by subclasses to translate an exception thrown by a list size finder Command into a Struts message, so a message is displayed to the user. May return null to default to a generic error message.
      Parameters:
      sizeFinderCommand - Size list finder Command.
      e - Exception thrown by ListSizeFinder.getSize(M) function.
    • execute

      public String execute() throws Exception
      Specified by:
      execute in interface Action
      Overrides:
      execute in class ActionSupport
      Throws:
      Exception