org.opensubsystems.patterns.listdata.www
Class ListDataActionTag

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
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
Direct Known Subclasses:
ListDataNextPageTag, ListDataPageSizeTag, ListDataPreviousPageTag, ListDataSpecificPageTag

public class ListDataActionTag
extends ListDataBaseTag

Custom tag to generate hyperlink that can invoke instance of ListBrowserServlet and perform the desired action such as going to the next or the previous page. 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: ListDataActionTag.java,v 1.3 2007/03/24 08:34:08 bastafidli Exp $
Author:
Miro Halas
See Also:
Serialized Form
Code reviewer:
Miro Halas
Code reviewed:
Initial revision

Field Summary
protected  java.lang.String m_strCommand
          Command specifying action to execute.
protected  java.lang.String m_strUrl
          Base url that should be used to generate the link.
 
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
ListDataActionTag()
          Constructor for custom tag.
 
Method Summary
 int doEndTag()
          
 int doStartTag()
          
protected  java.lang.String getActualPage(ListOptions listoptions)
           
protected  java.lang.String getBeginPosition(ListOptions listoptions)
           
protected  java.lang.String getClientOrderCode(ListOptions listoptions)
           
protected  java.lang.String getClientOrderDirection(ListOptions listoptions)
           
 java.lang.String getCommand()
          Get the command specifying action to execute.
protected  java.lang.String getDefinitionId(ListOptions listoptions)
           
protected  java.lang.String getDomainId(ListOptions listoptions)
           
protected  java.lang.String getEndPosition(ListOptions listoptions)
           
protected  java.lang.String getFirstVisibleItem(ListOptions listoptions)
           
protected  java.lang.String getIgnoredItemIDs(ListOptions listoptions)
           
protected  java.lang.String getKeepSelected(ListOptions listoptions)
           
protected  java.lang.String getMarkedItemIDs(ListOptions listoptions)
           
protected  java.lang.String getOrderColumnCodes(ListOptions listoptions)
           
protected  java.lang.String getOrderDirections(ListOptions listoptions)
           
protected  java.lang.String getPageSize(ListOptions listoptions)
           
protected  java.lang.String getParentDataType(ListOptions listoptions)
           
protected  java.lang.String getParentId(ListOptions listoptions)
           
protected  java.lang.String getSelectedItemIDs(ListOptions listoptions)
           
protected  java.lang.String getShowColumnCodes(ListOptions listoptions)
           
 java.lang.String getUrl()
          Get the url that should be used to generate the link.
 void setCommand(java.lang.String strCommand)
          Set the command specifying action to execute.
 void setUrl(java.lang.String strUrl)
          Set the url that should be used to generate the link.
 
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_strUrl

protected java.lang.String m_strUrl
Base url that should be used to generate the link. The url should be able to accept parameters using the standard notation [&]paramname=paramvalue. If no url is specified the tag will be used value of servletpath parameter sent by the WebSessionServlet derived servlet that processed request causing generation of this page.


m_strCommand

protected java.lang.String m_strCommand
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.

Constructor Detail

ListDataActionTag

public ListDataActionTag()
Constructor for custom tag.

Method Detail

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class org.opensubsystems.core.www.PageElementCacheTag
Throws:
javax.servlet.jsp.JspException

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class org.opensubsystems.core.www.PageElementCacheTag
Throws:
javax.servlet.jsp.JspException

getUrl

public java.lang.String getUrl()
Get the url that should be used to generate the link. The url should be able to accept parameters using the standard notation [&]paramname=paramvalue. If no url is specified the tag will be used value of servletpath parameter sent by the WebSessionServlet derived servlet that processed request causing generation of this page.

Returns:
String - base url to generate action link

setUrl

public void setUrl(java.lang.String strUrl)
Set the url that should be used to generate the link. The url should be able to accept parameters using the standard notation [&]paramname=paramvalue. Required.

Parameters:
strUrl - - base url to generate action link

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.

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.

Parameters:
strCommand - - command to execute

getDefinitionId

protected java.lang.String getDefinitionId(ListOptions listoptions)
Parameters:
listoptions - - list options used to generate this list
Returns:
String

getDomainId

protected java.lang.String getDomainId(ListOptions listoptions)
Parameters:
listoptions - - list options used to generate this list
Returns:
String

getPageSize

protected java.lang.String getPageSize(ListOptions listoptions)
Parameters:
listoptions - - list options used to generate this list
Returns:
String

getOrderColumnCodes

protected java.lang.String getOrderColumnCodes(ListOptions listoptions)
Parameters:
listoptions - - list options used to generate this list
Returns:
String

getOrderDirections

protected java.lang.String getOrderDirections(ListOptions listoptions)
Parameters:
listoptions - - list options used to generate this list
Returns:
String

getClientOrderCode

protected java.lang.String getClientOrderCode(ListOptions listoptions)
Parameters:
listoptions - - list options used to generate this list
Returns:
String

getClientOrderDirection

protected java.lang.String getClientOrderDirection(ListOptions listoptions)
Parameters:
listoptions - - list options used to generate this list
Returns:
String

getEndPosition

protected java.lang.String getEndPosition(ListOptions listoptions)
Parameters:
listoptions - - list options used to generate this list
Returns:
String

getActualPage

protected java.lang.String getActualPage(ListOptions listoptions)
Parameters:
listoptions - - list options used to generate this list
Returns:
String

getBeginPosition

protected java.lang.String getBeginPosition(ListOptions listoptions)
Parameters:
listoptions - - list options used to generate this list
Returns:
String

getShowColumnCodes

protected java.lang.String getShowColumnCodes(ListOptions listoptions)
Parameters:
listoptions - - list options used to generate this list
Returns:
String

getFirstVisibleItem

protected java.lang.String getFirstVisibleItem(ListOptions listoptions)
Parameters:
listoptions - - list options used to generate this list
Returns:
String

getSelectedItemIDs

protected java.lang.String getSelectedItemIDs(ListOptions listoptions)
Parameters:
listoptions - - list options used to generate this list
Returns:
String

getMarkedItemIDs

protected java.lang.String getMarkedItemIDs(ListOptions listoptions)
Parameters:
listoptions - - list options used to generate this list
Returns:
String

getParentDataType

protected java.lang.String getParentDataType(ListOptions listoptions)
Parameters:
listoptions - - list options used to generate this list
Returns:
String

getParentId

protected java.lang.String getParentId(ListOptions listoptions)
Parameters:
listoptions - - list options used to generate this list
Returns:
String

getIgnoredItemIDs

protected java.lang.String getIgnoredItemIDs(ListOptions listoptions)
Parameters:
listoptions - - list options used to generate this list
Returns:
String

getKeepSelected

protected java.lang.String getKeepSelected(ListOptions listoptions)
Parameters:
listoptions - - list options used to generate this list
Returns:
String


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