net.sf.oness.common.webapp.controller.action
Class ActionUtils

java.lang.Object
  extended bynet.sf.oness.common.webapp.controller.action.ActionUtils

public class ActionUtils
extends java.lang.Object

Utility class with action common methods.

Version:
$Revision: 1.1 $
Author:
Carlos Sanchez

Field Summary
static java.lang.String MAX_ELEMENTS_ATTRIBUTE_NAME
           
static java.lang.String RESULTS_ATTRIBUTE_NAME
           
 
Method Summary
static int getFirstElement(javax.servlet.http.HttpServletRequest request)
          Get the first element using displaytag page parameter from the request
static int getMaxElements(javax.servlet.http.HttpServletRequest request)
          Get the max number of elements using MAX_ELEMENTS_ATTRIBUTE_NAME parameter from the request
static void setIteratorPageParameters(net.sf.oness.common.model.util.PaginatedList list, javax.servlet.http.HttpServletRequest request)
          Set the common needed parameters for a page-by-page iterator.
static void setIteratorPageParameters(net.sf.oness.common.model.util.PaginatedList list, java.lang.String attributeName, javax.servlet.http.HttpServletRequest request)
          Set the common needed parameters for a page-by-page iterator Sets a PaginatedList (called RESULTS_ATTRIBUTE_NAME by default) and parameters for previous and next links
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESULTS_ATTRIBUTE_NAME

public static final java.lang.String RESULTS_ATTRIBUTE_NAME
See Also:
Constant Field Values

MAX_ELEMENTS_ATTRIBUTE_NAME

public static final java.lang.String MAX_ELEMENTS_ATTRIBUTE_NAME
See Also:
Constant Field Values
Method Detail

setIteratorPageParameters

public static void setIteratorPageParameters(net.sf.oness.common.model.util.PaginatedList list,
                                             java.lang.String attributeName,
                                             javax.servlet.http.HttpServletRequest request)

Set the common needed parameters for a page-by-page iterator

Sets a PaginatedList (called RESULTS_ATTRIBUTE_NAME by default) and parameters for previous and next links

Parameters:
list - The current page
attributeName - list will be saved in the request under this name, if null the RESULTS_ATTRIBUTE_NAME will be used
request -

setIteratorPageParameters

public static void setIteratorPageParameters(net.sf.oness.common.model.util.PaginatedList list,
                                             javax.servlet.http.HttpServletRequest request)
Set the common needed parameters for a page-by-page iterator. Equivalent to call setIteratorPageParameters(list, null, request)

Parameters:
list - The current page
request -
See Also:
setIteratorPageParameters(PaginatedList, String, Map, HttpServletRequest)

getFirstElement

public static int getFirstElement(javax.servlet.http.HttpServletRequest request)
Get the first element using displaytag page parameter from the request

Parameters:
request -
Returns:

getMaxElements

public static int getMaxElements(javax.servlet.http.HttpServletRequest request)
Get the max number of elements using MAX_ELEMENTS_ATTRIBUTE_NAME parameter from the request

Parameters:
request -
Returns:


Copyright © 2003-2005 ONess Project. All Rights Reserved.