org.extremecomponents.tree.tag
Class TreeTag

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

public class TreeTag
extends TableTag

org.extremecomponents.tree.tag.TreeTag.java -

Author:
Paul Horn
See Also:
Serialized Form

Field Summary
 java.lang.String parentAttribute
          Attribute of the bean holding a reference to it's parent.
 
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
TreeTag()
           
 
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 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 getIdentifier()
           
 TableModel getModel()
           
 int getModelRowsSize()
          Find out how many rows have been added to the Model.
 java.lang.String getParentAttribute()
           
 boolean hasMetaData()
           
 void setIdentifier(java.lang.String identifier)
           
 void setModel(TreeModel model)
           
 void setParentAttribute(java.lang.String parentAttribute)
           
 
Methods inherited from class org.extremecomponents.table.tag.TableTag
addExport, addForm, addInput, addParameter, getAction, getBorder, getCellpadding, getCellspacing, getCollection, getFilter, getHeaderClass, getId, getImagePath, getMaxRows, getPagination, getScope, getSort, getStyle, getStyleClass, getTitle, getWidth, setAction, setBorder, setCellpadding, setCellspacing, setCollection, setFilter, setHeaderClass, setId, setImagePath, setMaxRows, setPagination, setScope, setSort, setStyle, setStyleClass, setTitle, setWidth
 
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
 

Field Detail

parentAttribute

public java.lang.String parentAttribute
Attribute of the bean holding a reference to it's parent.

Constructor Detail

TreeTag

public TreeTag()
Method Detail

getParentAttribute

public java.lang.String getParentAttribute()
Returns:
Returns the parentAttribute.

setParentAttribute

public void setParentAttribute(java.lang.String parentAttribute)
Parameters:
parentAttribute - The parentAttribute to set.

getIdentifier

public java.lang.String getIdentifier()
Returns:
Returns the identifier.

setIdentifier

public void setIdentifier(java.lang.String identifier)
Parameters:
identifier - The identifier to set.

getModel

public TableModel getModel()
Overrides:
getModel in class TableTag
Returns:
Returns the model.

setModel

public void setModel(TreeModel model)
Parameters:
model - The model to set.

hasMetaData

public boolean hasMetaData()
Overrides:
hasMetaData in class TableTag

addColumnMetaData

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

Overrides:
addColumnMetaData in class TableTag

addColumnValue

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

Overrides:
addColumnValue in class TableTag

getModelRowsSize

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

Overrides:
getModelRowsSize in class TableTag

addProperty

public void addProperty(java.lang.String name,
                        java.lang.String value)
Overrides:
addProperty in class TableTag

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
Overrides:
doStartTag in class TableTag
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
Overrides:
doAfterBody in class TableTag
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
Overrides:
doEndTag in class TableTag
Throws:
javax.servlet.jsp.JspException

cleanup

public void cleanup()
Overrides:
cleanup in class TableTag


Copyright © 2004 sourceforge. All Rights Reserved.