org.opensubsystems.patterns.listdata.www
Class ListDataPageSizeTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by org.opensubsystems.core.www.PageElementCacheTag
              extended by org.opensubsystems.patterns.listdata.www.ListDataBaseTag
                  extended by org.opensubsystems.patterns.listdata.www.ListDataActionTag
                      extended by org.opensubsystems.patterns.listdata.www.ListDataPageSizeTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class ListDataPageSizeTag
extends ListDataActionTag

Custom tag to generate hyperlink that can invoke instance of ListBrowserServlet and display the current page with specific number of items. This class implements functionality similar to methods in listdata.js but only based on the data available at the time when the page is generated. If the page dynamically changes some of the list data pattern variables for example based on users' action, you should use methods in the listdata.js instead. Keep this functionality synchronized with the one provided by the JavaScript file.

Version:
$Id: ListDataPageSizeTag.java,v 1.2 2007/02/20 04:18:18 bastafidli Exp $
Author:
Miro Halas
See Also:
Serialized Form
Code reviewer:
Miro Halas
Code reviewed:
Initial revision

Field Summary
protected  java.lang.String m_strPageSize
          Number of items to display on a page at once.
 
Fields inherited from class org.opensubsystems.patterns.listdata.www.ListDataActionTag
m_strCommand, m_strUrl
 
Fields inherited from class org.opensubsystems.patterns.listdata.www.ListDataBaseTag
m_strOptions
 
Fields inherited from class org.opensubsystems.core.www.PageElementCacheTag
CACHE_INDICATOR, CSS_ELEMENT, JS_ELEMENT, m_strCacheas, m_strId, PAGE_ELEMENTS_CACHE, SCRIPT_ELEMENT
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
ListDataPageSizeTag()
          Constructor for custom tag.
 
Method Summary
 java.lang.String getCommand()
          Get the command specifying action to execute.
 java.lang.String getPageSize()
          Get the number of items to display at the page at once.
protected  java.lang.String getPageSize(ListOptions listoptions)
          
 void setCommand(java.lang.String strCommand)
          Set the command specifying action to execute.
 void setPageSize(int iPageSize)
          Set the number of items to display at the page at once.
 void setPageSize(java.lang.String strPageSize)
          Set the number of items to display at the page at once.
 
Methods inherited from class org.opensubsystems.patterns.listdata.www.ListDataActionTag
doEndTag, doStartTag, getActualPage, getBeginPosition, getClientOrderCode, getClientOrderDirection, getDefinitionId, getDomainId, getEndPosition, getFirstVisibleItem, getIgnoredItemIDs, getKeepSelected, getMarkedItemIDs, getOrderColumnCodes, getOrderDirections, getParentDataType, getParentId, getSelectedItemIDs, getShowColumnCodes, getUrl, setUrl
 
Methods inherited from class org.opensubsystems.patterns.listdata.www.ListDataBaseTag
getExtraConditionAttribute, getExtraConditionObject, getExtraConditionOperation, getExtraConditionValue, getExtraConditionValueType, getOptions, getOptionsObject, setOptions
 
Methods inherited from class org.opensubsystems.core.www.PageElementCacheTag
cache, getCacheas, getCachedContent, getCachedContent, getCachedContent, getCachedContentElements, getId, setCacheas, setId
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, getBodyContent, getPreviousOut, release, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getParent, getValue, getValues, removeValue, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Field Detail

m_strPageSize

protected java.lang.String m_strPageSize
Number of items to display on a page at once. Required.

Constructor Detail

ListDataPageSizeTag

public ListDataPageSizeTag()
Constructor for custom tag.

Method Detail

getCommand

public java.lang.String getCommand()
Get the command specifying action to execute. Recognized values are previous,next, goto, pagesize, but you can specify your own if you implement support for it on the backend in your ListBrowserServlet derived class. Required.

Overrides:
getCommand in class ListDataActionTag
Returns:
String - command to execute

setCommand

public void setCommand(java.lang.String strCommand)
Set the command specifying action to execute. Recognized values are previous,next, goto, pagesize, but you can specify your own if you implement support for it on the backend in your ListBrowserServlet derived class. Required.

Overrides:
setCommand in class ListDataActionTag
Parameters:
strCommand - - command to execute

getPageSize

public java.lang.String getPageSize()
Get the number of items to display at the page at once.


setPageSize

public void setPageSize(java.lang.String strPageSize)
Set the number of items to display at the page at once.

Parameters:
strPageSize - - page to display

setPageSize

public void setPageSize(int iPageSize)
Set the number of items to display at the page at once.

Parameters:
iPageSize - - page to display

getPageSize

protected java.lang.String getPageSize(ListOptions listoptions)

Overrides:
getPageSize in class ListDataActionTag
Parameters:
listoptions - - list options used to generate this list
Returns:
String


Copyright © 2003 - 2006 OpenSubsystems s.r.o.