java.lang.Object | +--com.ibm.commerce.pa.beans.DynamicDataBeanImpl | +--com.ibm.commerce.pa.widget.beans.TableDataBean
Field Summary | |
---|---|
protected
java.util.Hashtable |
columnNameCache |
protected
java.lang.Boolean |
removeIrrelevant |
protected
java.util.Vector |
table |
Fields inherited from class com.ibm.commerce.pa.beans. DynamicDataBeanImpl |
constraintList,
COPYRIGHT,
defaultWidget,
errorCode,
errorMessage,
interfaceName,
metaData,
pageName,
parent,
parentName,
requestProperties,
scriptName |
Fields inherited from interface com.ibm.commerce.beans. DataBean |
emptyString |
Constructor Summary | |
---|---|
TableDataBean() TableDataBean constructor. |
Method Summary | |
---|---|
void |
addColumn(
ColumnDataBean ds) This method adds a column to the table as long as the table contains columns. |
void |
addRow(
ListDataBean ds) This method adds a row to the table as long as the table contains rows. |
void |
copy(
DynamicDataBean ds) Copies a databean into this databean. |
void |
createColumnNameCache() This method will create a cache of column names and their indexes. |
ColumnDataBean |
getColumn(java.lang.String columnName) This method will return a column given the name. |
ColumnDataBean |
getColumnAt(int columnIndex) This method will return the Nth column of a table. |
int |
getColumnCount() This method returns the number of columns in the table. |
int |
getColumnIndex(java.lang.String columnName) This method will return the index of a column given the name. |
ElementDataBean |
getElementAt(int rowIndex, int columnIndex) This method returns one ElementDataBean cell from the table. |
boolean |
getRemoveIrrelevant() If a column is empty it is considered irrelevant. |
ListDataBean |
getRowAt(int rowIndex) This method returns a single row from the table. |
int |
getRowCount() Retrieve the number of rows in the table. |
ListDataBean[] |
getRowElements() Retrieve the rows in the table. |
protected
java.util.Vector |
getTable() This method gets the table with one call |
java.lang.String[] |
getTableHeaderPresentation() Each column has a display name associated with it to be used as column headings when the table is displayed. |
void |
insertColumn(
ColumnDataBean ds, int index) This method inserts a column to the table as long as the table contains columns. |
void |
insertRow(
ListDataBean ds, int index) This method inserts a row to the table as long as the table contains ListDataBeans. |
int |
removeIrrelevantColumns() This method will remove empty columns from the table. |
void |
setRemoveIrrelevant(java.lang.Boolean newValue) Set the flag indicating whether empty columns should be removed from the form. |
protected
void |
setTable(java.util.Vector newValue) This method sets the table with one call |
Methods inherited from class com.ibm.commerce.pa.beans. DynamicDataBeanImpl |
addConstraint,
getCommandInterfaceName,
getConstraintList,
getDefaultWidget,
getErrorCode,
getErrorMessage,
getMetaData,
getPageName,
getParent,
getParentName,
getRequestProperties,
getScriptName,
setCommandInterfaceName,
setConstraintList,
setDefaultWidget,
setErrorCode,
setErrorMessage,
setMetaData,
setPageName,
setParent,
setParentName,
setRequestProperties,
setScriptName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Vector table
protected java.util.Hashtable columnNameCache
protected java.lang.Boolean removeIrrelevant
Constructor Detail |
---|
public TableDataBean()
Method Detail |
---|
public void addColumn(ColumnDataBean ds)
ds
- The column you want to add.public void addRow(ListDataBean ds)
ds
- The row you want to add.public void copy(DynamicDataBean ds)
copy
in interface
DynamicDataBean
copy
in class
DynamicDataBeanImpl
ds
- The databean to copy.public void createColumnNameCache()
public ColumnDataBean getColumn(java.lang.String columnName)
columnName
- The name of the column to be retrieved.public ColumnDataBean getColumnAt(int columnIndex)
columnIndex
- The index of the column to retrieve.public int getColumnCount()
public int getColumnIndex(java.lang.String columnName)
columnName
- The name of the column you want the index
of.public ElementDataBean getElementAt(int rowIndex, int columnIndex)
rowIndex
- The row that the cell is in.columnIndex
- The column of the cell you want.public boolean getRemoveIrrelevant()
public ListDataBean getRowAt(int rowIndex)
rowIndex
- The index of the row starting at zero for the first
row.public int getRowCount()
public ListDataBean[] getRowElements()
protected java.util.Vector getTable()
public java.lang.String[] getTableHeaderPresentation()
public void insertColumn(ColumnDataBean ds, int index)
ds
- The column you want to add.public void insertRow(ListDataBean ds, int index)
ds
- The row you want to insert.public int removeIrrelevantColumns()
public void setRemoveIrrelevant(java.lang.Boolean newValue)
newValue
- true to remove empty columns; false
otherwise.protected void setTable(java.util.Vector newValue)
newValue
- java.util.Vector