org.davesag.generica.servlet.action
Class ListAction

java.lang.Object
  extended byorg.apache.struts.action.Action
      extended byorg.davesag.generica.servlet.action.AbstractAction
          extended byorg.davesag.generica.servlet.action.ListAction

public class ListAction
extends AbstractAction

The ListAction uses the lister and summariser specified in the struts-config.xml file to prepare a List of object summaries for presentation to the GUI. It saves this List in the request under the key Constants.TARGET_KEY.

If no summariser is provided it will list the raw objects.
You can provide parameters to the Lister either via the struts-config.xml, or the request. eg

          http://localhost:8080/myapp/listthing.do?list-param0=sort-by:lastModified&
                  list-param1=filter-by-author.id:153
 
NOTE: request parameters override action parameters which serve as the default.

Since:
Generica 1.0
Version:
CVS Revision $Id: ListAction.java,v 1.13 2004/04/06 15:40:41 davesag Exp $
Author:
Dave Sag http://www.davesag.com
See Also:
Lister

Field Summary
 
Fields inherited from class org.apache.struts.action.Action
ACTION_SERVLET_KEY, APPLICATION_KEY, DATA_SOURCE_KEY, defaultLocale, ERROR_KEY, EXCEPTION_KEY, FORM_BEANS_KEY, FORWARDS_KEY, LOCALE_KEY, MAPPING_KEY, MAPPINGS_KEY, MESSAGE_KEY, MESSAGES_KEY, MULTIPART_KEY, PLUG_INS_KEY, REQUEST_PROCESSOR_KEY, servlet, SERVLET_KEY, TRANSACTION_TOKEN_KEY
 
Constructor Summary
ListAction()
           
 
Method Summary
 ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
          loads a list of target objects into the request.
 
Methods inherited from class org.davesag.generica.servlet.action.AbstractAction
abortTransaction, commitTransaction, furtherActions, genericActions, getApplication, getController, getController, getHibernateSession, getLocale, getMessages, getNextForward, openTransaction, presentation, saveActionErrors, setNextForward
 
Methods inherited from class org.apache.struts.action.Action
execute, generateToken, getDataSource, getDataSource, getLocale, getResources, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, perform, perform, resetToken, saveErrors, saveMessages, saveToken, setLocale, setServlet, toHex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListAction

public ListAction()
Method Detail

execute

public ActionForward execute(ActionMapping mapping,
                             ActionForm form,
                             HttpServletRequest request,
                             HttpServletResponse response)
                      throws Exception
loads a list of target objects into the request.

Parameters:
mapping - the struts actioin mapping
form - the form bean
request - the http request
response - the http response.
Returns:
the right action foreward
Throws:
Exception - if anything went wrong.


Dave Sag Generica API version 0.5.9 - (prerelease) Copyright 2003 - 2004 Dave Sag.