org.opensubsystems.patterns.scrollabletable.www
Class ScrollableTableTag

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.core.www.BlockElementTag
                  extended by org.opensubsystems.patterns.scrollabletable.www.ScrollableTableTag
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 ScrollableTableTag
extends org.opensubsystems.core.www.BlockElementTag

Custom tag to generate all HTML code necessary to display scrollable table. This is the main tag which represents the table itself. The contents of the table will be created from the content of the body of this tag.

Version:
$Id: ScrollableTableTag.java,v 1.19 2007/01/07 06:14:16 bastafidli Exp $
Author:
Miro Halas
See Also:
Serialized Form
Code reviewer:
Miro Halas
Code reviewed:
1.15 2006/06/16 10:27:30 jlegeny

Field Summary
static java.lang.String ACTIVE_SCROLLABLE_TABLE_ID
          Id of the active tabbed dialog which will be used by all other related tags.
protected  java.lang.String m_strCheck
          Flag signaling if each row of the table should contain a checkbox in its first column.
protected  java.lang.String m_strLimit
          How many rows should the table contain at most.
protected  java.lang.String m_strSortable
          Flag signaling if the list can be sorted by user clicking on a column header.
static java.lang.String SCROLLABLE_TABLE_CHECK
          The control which should allow to show checkboxes for each line in the table.
static java.lang.String SCROLLABLE_TABLE_PREFIX
          Name of the table that has no specified ID
static java.lang.String SCROLLABLE_TABLE_ROW_LIMIT
          Name of property for assigned table rows limit value
static java.lang.String SCROLLABLE_TABLE_SORTABLE
          Name of property for table columns that can be sortable
static java.lang.String WEBUI_LIST_CHECK
          Configuration setting for a flag controlling if scrollable tables has a checkbox in each line.
static boolean WEBUI_LIST_CHECK_DEFAULT
          Default value of flag that allows to show checkboxes for each line in the table.
static java.lang.String WEBUI_LIST_SORTABLE
          Configuration setting for a flag controlling if rows of a scrollable table can be sorted by clicking on a column heading.
static boolean WEBUI_LIST_SORTABLE_DEFAULT
          Default value of flag that allows to table columns to be sortable.
 
Fields inherited from class org.opensubsystems.core.www.BlockElementTag
CURRENT_ELEMENT_ID, DIV_BLOCK_ELEMENT, m_strCssclass, m_strIdSuffix, m_strRelatedIds, m_strStyle, m_strType, SPAN_BLOCK_ELEMENT
 
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
ScrollableTableTag()
          Constructor for custom tag.
 
Method Summary
 int doEndTag()
          
 int doStartTag()
          
 java.lang.String getCheck()
           
 java.lang.String getLimit()
           
 java.lang.String getSortable()
           
 boolean isCheckActive()
           
 boolean isSortableActive()
           
 void setCheck(boolean bCheck)
           
 void setCheck(java.lang.String strCheck)
           
 void setLimit(java.lang.String strLimit)
           
 void setSortable(boolean bSortable)
           
 void setSortable(java.lang.String strSortable)
           
 
Methods inherited from class org.opensubsystems.core.www.BlockElementTag
adjustId, getCssclass, getCurrentId, getRelatedids, getStyle, getType, isRelatedIdsTag, popCurrentId, pushCurrentId, restoreId, setCssclass, setRelatedids, setRelatedids, setStoredId, setStyle, setType
 
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

WEBUI_LIST_CHECK

public static final java.lang.String WEBUI_LIST_CHECK
Configuration setting for a flag controlling if scrollable tables has a checkbox in each line.

See Also:
Constant Field Values

WEBUI_LIST_SORTABLE

public static final java.lang.String WEBUI_LIST_SORTABLE
Configuration setting for a flag controlling if rows of a scrollable table can be sorted by clicking on a column heading.

See Also:
Constant Field Values

WEBUI_LIST_CHECK_DEFAULT

public static final boolean WEBUI_LIST_CHECK_DEFAULT
Default value of flag that allows to show checkboxes for each line in the table.

See Also:
Constant Field Values

WEBUI_LIST_SORTABLE_DEFAULT

public static final boolean WEBUI_LIST_SORTABLE_DEFAULT
Default value of flag that allows to table columns to be sortable.

See Also:
Constant Field Values

ACTIVE_SCROLLABLE_TABLE_ID

public static final java.lang.String ACTIVE_SCROLLABLE_TABLE_ID
Id of the active tabbed dialog which will be used by all other related tags.

See Also:
Constant Field Values

SCROLLABLE_TABLE_CHECK

public static final java.lang.String SCROLLABLE_TABLE_CHECK
The control which should allow to show checkboxes for each line in the table.

See Also:
Constant Field Values

SCROLLABLE_TABLE_SORTABLE

public static final java.lang.String SCROLLABLE_TABLE_SORTABLE
Name of property for table columns that can be sortable

See Also:
Constant Field Values

SCROLLABLE_TABLE_ROW_LIMIT

public static final java.lang.String SCROLLABLE_TABLE_ROW_LIMIT
Name of property for assigned table rows limit value

See Also:
Constant Field Values

SCROLLABLE_TABLE_PREFIX

public static final java.lang.String SCROLLABLE_TABLE_PREFIX
Name of the table that has no specified ID

See Also:
Constant Field Values

m_strCheck

protected java.lang.String m_strCheck
Flag signaling if each row of the table should contain a checkbox in its first column. These checkboxes will be used for selecting particular item (row) in the table. This attribute should say true or 1 if checkbox should be present. This attribute works only if the content of the scrollable table is generated using custom tags derived from ListTag class.


m_strSortable

protected java.lang.String m_strSortable
Flag signaling if the list can be sorted by user clicking on a column header. This attribute should say true or 1 if table content can be sorted.


m_strLimit

protected java.lang.String m_strLimit
How many rows should the table contain at most. This value is used by various JavaScripts dynamically modifying the content of the table. 0 means no limit.

Constructor Detail

ScrollableTableTag

public ScrollableTableTag()
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.BlockElementTag
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.BlockElementTag
Throws:
javax.servlet.jsp.JspException

getCheck

public java.lang.String getCheck()
Returns:
String - If checkbox will be present in each row then this attribute should say true or 1. This attribute works only if the content of the scrollable table is generated using custom tags derived from ListTag class.

setCheck

public void setCheck(java.lang.String strCheck)
Parameters:
strCheck - - If checkbox will be present in each row then this attribute should say true or 1. This attribute works only if the content of the scrollable table is generated using custom tags derived from ListTag class.

setCheck

public void setCheck(boolean bCheck)
Parameters:
bCheck - - If checkbox will be present in each row then this attribute should say true or 1. This attribute works only if the content of the scrollable table is generated using custom tags derived from ListTag class.

isCheckActive

public boolean isCheckActive()
Returns:
boolean - true if checkbox will be present in each row of the table This attribute works only if the content of the scrollable table is generated using custom tags derived from ListTag class.

getSortable

public java.lang.String getSortable()
Returns:
String - If table columns have to be sortable say true or 1.

setSortable

public void setSortable(java.lang.String strSortable)
Parameters:
strSortable - - If table columns have to be sortable say true or 1.

setSortable

public void setSortable(boolean bSortable)
Parameters:
bSortable - - If table columns have to be sortable say true or 1.

isSortableActive

public boolean isSortableActive()
Returns:
boolean - true if table columns will be sortable

getLimit

public java.lang.String getLimit()
Returns:
String - get limit of assigned items.

setLimit

public void setLimit(java.lang.String strLimit)
Parameters:
strLimit - - limit of assigned items.


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