org.extremecomponents.table.tag
Class TableTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byorg.extremecomponents.table.tag.TableTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, TableAttributes, javax.servlet.jsp.tagext.Tag
Direct Known Subclasses:
TreeTag

public class TableTag
extends javax.servlet.jsp.tagext.TagSupport
implements TableAttributes

The container which holds all the main table information. Will also hold global information if needed. The table tag is copied into the Table and encapsulated in the Model.

Author:
Jeff Johnston
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
pageContext
 
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
TableTag()
           
 
Method Summary
 void addColumnMetaData(Column column)
          Add the Column meta data to the Model
 void addColumnValue(java.lang.String property, java.lang.Object value)
          Add a Column value to the Model
 void addExport(Export export)
           
 void addForm(Form form)
           
 void addInput(Input input)
           
 void addParameter(java.lang.String name, java.lang.String value)
           
 void addProperty(java.lang.String name, java.lang.String value)
           
 void cleanup()
           
 int doAfterBody()
          Two things need to be accomplished here.
 int doEndTag()
          As a convenience use the EL expression langauge for the columns that need it.
 int doStartTag()
          The start of the tag.
 java.lang.String getAction()
           
 java.lang.String getBorder()
           
 java.lang.String getCellpadding()
           
 java.lang.String getCellspacing()
           
 java.lang.String getCollection()
           
 java.lang.String getFilter()
           
 java.lang.String getHeaderClass()
           
 java.lang.String getId()
           
 java.lang.String getImagePath()
           
 java.lang.String getMaxRows()
           
 TableModel getModel()
           
 int getModelRowsSize()
          Find out how many rows have been added to the Model.
 java.lang.String getPagination()
           
 java.lang.String getScope()
           
 java.lang.String getSort()
           
 java.lang.String getStyle()
           
 java.lang.String getStyleClass()
           
 java.lang.String getTitle()
           
 java.lang.String getWidth()
           
 boolean hasMetaData()
           
 void setAction(java.lang.String action)
           
 void setBorder(java.lang.String border)
           
 void setCellpadding(java.lang.String cellpadding)
           
 void setCellspacing(java.lang.String cellspacing)
           
 void setCollection(java.lang.String collection)
           
 void setFilter(java.lang.String filter)
           
 void setHeaderClass(java.lang.String headerClass)
           
 void setId(java.lang.String id)
           
 void setImagePath(java.lang.String imagePath)
           
 void setMaxRows(java.lang.String maxRows)
           
 void setPagination(java.lang.String pagination)
           
 void setScope(java.lang.String scope)
           
 void setSort(java.lang.String sort)
           
 void setStyle(java.lang.String style)
           
 void setStyleClass(java.lang.String styleClass)
           
 void setTitle(java.lang.String title)
           
 void setWidth(java.lang.String width)
           
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getParent, getValue, getValues, release, removeValue, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableTag

public TableTag()
Method Detail

getId

public java.lang.String getId()
Specified by:
getId in interface TableAttributes

setId

public void setId(java.lang.String id)
Specified by:
setId in interface TableAttributes

getCollection

public java.lang.String getCollection()
Specified by:
getCollection in interface TableAttributes

setCollection

public void setCollection(java.lang.String collection)
Specified by:
setCollection in interface TableAttributes

getAction

public java.lang.String getAction()
Specified by:
getAction in interface TableAttributes

setAction

public void setAction(java.lang.String action)
Specified by:
setAction in interface TableAttributes

getScope

public java.lang.String getScope()
Specified by:
getScope in interface TableAttributes

setScope

public void setScope(java.lang.String scope)
Specified by:
setScope in interface TableAttributes

getStyleClass

public java.lang.String getStyleClass()
Specified by:
getStyleClass in interface TableAttributes

setStyleClass

public void setStyleClass(java.lang.String styleClass)
Specified by:
setStyleClass in interface TableAttributes

getHeaderClass

public java.lang.String getHeaderClass()
Specified by:
getHeaderClass in interface TableAttributes

setHeaderClass

public void setHeaderClass(java.lang.String headerClass)
Specified by:
setHeaderClass in interface TableAttributes

getBorder

public java.lang.String getBorder()
Specified by:
getBorder in interface TableAttributes

setBorder

public void setBorder(java.lang.String border)
Specified by:
setBorder in interface TableAttributes

getCellpadding

public java.lang.String getCellpadding()
Specified by:
getCellpadding in interface TableAttributes

setCellpadding

public void setCellpadding(java.lang.String cellpadding)
Specified by:
setCellpadding in interface TableAttributes

getCellspacing

public java.lang.String getCellspacing()
Specified by:
getCellspacing in interface TableAttributes

setCellspacing

public void setCellspacing(java.lang.String cellspacing)
Specified by:
setCellspacing in interface TableAttributes

getMaxRows

public java.lang.String getMaxRows()
Specified by:
getMaxRows in interface TableAttributes

setMaxRows

public void setMaxRows(java.lang.String maxRows)
Specified by:
setMaxRows in interface TableAttributes

getFilter

public java.lang.String getFilter()
Specified by:
getFilter in interface TableAttributes

setFilter

public void setFilter(java.lang.String filter)
Specified by:
setFilter in interface TableAttributes

getPagination

public java.lang.String getPagination()
Specified by:
getPagination in interface TableAttributes

setPagination

public void setPagination(java.lang.String pagination)
Specified by:
setPagination in interface TableAttributes

getImagePath

public java.lang.String getImagePath()
Specified by:
getImagePath in interface TableAttributes

setImagePath

public void setImagePath(java.lang.String imagePath)
Specified by:
setImagePath in interface TableAttributes

getSort

public java.lang.String getSort()
Specified by:
getSort in interface TableAttributes

setSort

public void setSort(java.lang.String sort)
Specified by:
setSort in interface TableAttributes

getTitle

public java.lang.String getTitle()
Specified by:
getTitle in interface TableAttributes

setTitle

public void setTitle(java.lang.String title)
Specified by:
setTitle in interface TableAttributes

getStyle

public java.lang.String getStyle()
Specified by:
getStyle in interface TableAttributes

setStyle

public void setStyle(java.lang.String style)
Specified by:
setStyle in interface TableAttributes

getWidth

public java.lang.String getWidth()
Specified by:
getWidth in interface TableAttributes

setWidth

public void setWidth(java.lang.String width)
Specified by:
setWidth in interface TableAttributes

addParameter

public void addParameter(java.lang.String name,
                         java.lang.String value)

addForm

public void addForm(Form form)

addInput

public void addInput(Input input)

addProperty

public void addProperty(java.lang.String name,
                        java.lang.String value)

addExport

public void addExport(Export export)

hasMetaData

public boolean hasMetaData()

addColumnMetaData

public void addColumnMetaData(Column column)
Add the Column meta data to the Model


addColumnValue

public void addColumnValue(java.lang.String property,
                           java.lang.Object value)
Add a Column value to the Model


getModelRowsSize

public int getModelRowsSize()
Find out how many rows have been added to the Model.


getModel

public TableModel getModel()

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
The start of the tag. First fire up the Model and then make a copy of the table tag attributes to send to the model.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Throws:
javax.servlet.jsp.JspException

doAfterBody

public int doAfterBody()
                throws javax.servlet.jsp.JspException
Two things need to be accomplished here. First, need to iterate once over the columns to load up all the attributes. Second, need to iterate over the columns as many times as specified by the maxRows attribute so the columns rows can be resolved. On each iteration over the columns the current bean in the Collection is passed via the PageContext.

Specified by:
doAfterBody in interface javax.servlet.jsp.tagext.IterationTag
Throws:
javax.servlet.jsp.JspException

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
As a convenience use the EL expression langauge for the columns that need it. Also execute the Model so that it can do all its processing and build the table.

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Throws:
javax.servlet.jsp.JspException

cleanup

public void cleanup()


Copyright © 2004 sourceforge. All Rights Reserved.