org.enhydra.barracuda.core.comp
Class BTable

java.lang.Object
  extended byorg.enhydra.barracuda.core.comp.AbstractBComponent
      extended byorg.enhydra.barracuda.core.comp.BComponent
          extended byorg.enhydra.barracuda.core.comp.BTable
All Implemented Interfaces:
BContainer, StateMap

public class BTable
extends BComponent

A BTable is used to put data into a table format within a DOM. In practice, this has proven to be one of the least used Barracuda components, since it it usually a lot easier (and more flexible) simply to use a BTemplate.

In the case of BTable, you will ALMOST ALWAYS need to manually bind it to a View, unless you happen to be returning it from a model (in which case this will be done for you automatically)


Field Summary
protected  BText caption
           
protected  TableModel footerModel
           
protected  TableModel headerModel
           
protected static org.apache.log4j.Logger logger
           
protected  TableModel model
           
protected  Node templateNode
           
 
Fields inherited from class org.enhydra.barracuda.core.comp.BComponent
attrs, enabled, name, rs, VISIBILITY_MARKER, visible
 
Fields inherited from class org.enhydra.barracuda.core.comp.AbstractBComponent
children, dvc, isStepChild, parent, statemap, stepChildren, tempViews, validated, views
 
Constructor Summary
BTable()
          Public noargs constructor
BTable(TableModel imodel)
          Public constructor which creates the component and binds it to a specific model.
 
Method Summary
 void destroyCycle()
          Destroy cycle.
 BText getCaption()
          Get the caption that backs the table
 TableModel getFooterModel()
          Get the footer model that backs the table
 TableModel getHeaderModel()
          Get the header model that backs the table
 TableModel getModel()
          Get the model that backs the table
 void setCaption(BText icaption)
          Set the caption that backs the table
 void setFooterModel(TableModel imodel)
          Set the footer model that backs the table.
 void setHeaderModel(TableModel imodel)
          Set the header model that backs the table.
 void setModel(TableModel imodel)
          Set the model that backs the table.
 
Methods inherited from class org.enhydra.barracuda.core.comp.BComponent
addView, getAttr, getAttrMap, getFirstView, getName, getRenderStrategy, getViews, isEnabled, isVisible, postRender, preRender, removeAllViews, removeView, render, render, renderView, renderView, setAttr, setEnabled, setEnabled, setName, setRenderStrategy, setView, setVisible, setVisible, supports
 
Methods inherited from class org.enhydra.barracuda.core.comp.AbstractBComponent
addChild, addStepChild, addStepChild, addTempView, clearState, findComponentMap, findRendererFactory, getChild, getChildren, getDefaultViewContext, getParent, getRenderer, getRenderer, getRootComponent, getState, getStateKeys, getStateValues, hasChildren, hasViews, initCycle, installRendererFactory, invalidate, isStepChild, printStackTrace, printStackTrace, printStackTrace, putState, removeAll, removeAllStepChildren, removeChild, removeChild, removeState, setDefaultViewContext, setParent, toRef, toString, toString, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected static final org.apache.log4j.Logger logger

model

protected TableModel model

headerModel

protected TableModel headerModel

footerModel

protected TableModel footerModel

templateNode

protected Node templateNode

caption

protected BText caption
Constructor Detail

BTable

public BTable()
Public noargs constructor


BTable

public BTable(TableModel imodel)
Public constructor which creates the component and binds it to a specific model. The component is also bound to the specified view.

Null values may be passed in for any parameters, but if you do so you will need manually provide these values (via the accessor methods) prior to actually rendering the component

Parameters:
imodel - the specific model to back this component
Method Detail

setModel

public void setModel(TableModel imodel)
Set the model that backs the table. This causes the table to register as a listener on the model, so any changes to it will be reflected in the table.

Parameters:
imodel - the model that backs the table

getModel

public TableModel getModel()
Get the model that backs the table

Returns:
the model that backs the table

setHeaderModel

public void setHeaderModel(TableModel imodel)
Set the header model that backs the table. This causes the table to register as a listener on the model, so any changes to it will be reflected in the table header.

Parameters:
imodel - the headermodel that backs the table

getHeaderModel

public TableModel getHeaderModel()
Get the header model that backs the table

Returns:
the header model that backs the table

setFooterModel

public void setFooterModel(TableModel imodel)
Set the footer model that backs the table. This causes the table to register as a listener on the model, so any changes to it will be reflected in the table footer.

Parameters:
imodel - the footer model that backs the table

getFooterModel

public TableModel getFooterModel()
Get the footer model that backs the table

Returns:
the footer model that backs the table

setCaption

public void setCaption(BText icaption)
Set the caption that backs the table

Parameters:
icaption - A BText to represent to Caption Element.

getCaption

public BText getCaption()
Get the caption that backs the table

Returns:
the caption to be rendered

destroyCycle

public void destroyCycle()
Destroy cycle. The component should use this cycle to perform any special cleanup.

Overrides:
destroyCycle in class AbstractBComponent


Copyright © 2003 BarracudaMVC.org All Rights Reserved.