org.opensubsystems.patterns.scrollabletable.www
Class ScrollableTableJSTag

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.scrollabletable.www.ScrollableTableJSTag
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 ScrollableTableJSTag
extends org.opensubsystems.core.www.PageElementCacheTag

Custom tag to generate JavaScript required to interact with the scrollable table. Currently supported functions are onload - id - id of the scrollable table for which the JavaScript is generated - param1 - how to determine size of the table. Accepted values are: "fixed" - the table will have fixed height "fill" - the table will fill the whole content of the client area of the browser window - param2 - if param1 is "fixed", then this parameter will contain fixed width value in pixels of the table if param1 is "fill", then this parameter is ignored - param3 - if param1 is "fixed", then this parameter will contain number of rows that the table is going to contain (not only visible rows but total number of rows) if param1 is fill, then this parameter is ignored onresize - the same parameters as onload

Version:
$Id: ScrollableTableJSTag.java,v 1.6 2007/01/07 06:14:16 bastafidli Exp $
Author:
Miro Halas
See Also:
Serialized Form
Code reviewer:
Miro Halas
Code reviewed:
1.3 2006/02/18 05:29:32 bastafidli

Field Summary
protected  int m_iParam2
          Parameter 2 to pass to the function if it allows it.
protected  int m_iParam3
          Parameter 3 to pass to the function if it allows it.
protected  java.lang.String m_strFunction
          Name of the function to generate the javascript for.
protected  java.lang.String m_strParam1
          Parameter 1 to pass to the function if it allows it.
 
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
ScrollableTableJSTag()
          Constructor for custom tag.
 
Method Summary
 int doEndTag()
          
 int doStartTag()
          
 java.lang.String getFunction()
           
 java.lang.String getParam1()
           
 int getParam2()
           
 int getParam3()
           
 void setFunction(java.lang.String strFunction)
           
 void setParam1(java.lang.String strParam1)
           
 void setParam2(int iParam2)
           
 void setParam3(int iParam3)
           
 
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_strFunction

protected java.lang.String m_strFunction
Name of the function to generate the javascript for. Currently supported functions are onload, onresize.


m_strParam1

protected java.lang.String m_strParam1
Parameter 1 to pass to the function if it allows it.


m_iParam2

protected int m_iParam2
Parameter 2 to pass to the function if it allows it.


m_iParam3

protected int m_iParam3
Parameter 3 to pass to the function if it allows it.

Constructor Detail

ScrollableTableJSTag

public ScrollableTableJSTag()
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

getFunction

public java.lang.String getFunction()
Returns:
String - Name of the function to generate the javascript for. Currently supported functions are onload, onresize.

getParam1

public java.lang.String getParam1()
Returns:
String - Value of parameter 1 if the function requires it.

getParam2

public int getParam2()
Returns:
int - Value of parameter 2 if the function requires it.

getParam3

public int getParam3()
Returns:
int - Value of parameter 3 if the function requires it.

setFunction

public void setFunction(java.lang.String strFunction)
Parameters:
strFunction - - Name of the function to generate the javascript for. Currently supported functions are onload, onresize, ondialoghelp.

setParam1

public void setParam1(java.lang.String strParam1)
Parameters:
strParam1 - - Value of parameter 1 if the function requires it.

setParam2

public void setParam2(int iParam2)
Parameters:
iParam2 - - Value of parameter 2 if the function requires it.

setParam3

public void setParam3(int iParam3)
Parameters:
iParam3 - - Value of parameter 2 if the function requires it.


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