com.oktiva.mogno.additional
Class SimpleTable

java.lang.Object
  extended bycom.oktiva.mogno.Component
      extended bycom.oktiva.mogno.Visual
          extended bycom.oktiva.mogno.Container
              extended bycom.oktiva.mogno.html.Table
                  extended bycom.oktiva.mogno.additional.SimpleTable
All Implemented Interfaces:
java.lang.Cloneable

public class SimpleTable
extends Table

Version:
$Id: SimpleTable.java,v 1.1.1.1 2005/01/05 16:52:58 ruoso Exp $

Field Summary
 boolean active
          Activate/deactivate this SimpleList.
 java.lang.String columnIdentifiers
          String with the comumn's names and widths, in the following format:
name1|attr1=val1|attr2=val2&name2|attr3=val3...
protected  java.util.Vector dataVector
          Vector of Vectors with the table data.
 java.lang.String editableColumns
           
 java.lang.String evOnRemoveRow
           
 java.lang.String hiddenColumns
           
 java.lang.String removeButtonLabel
          The label to show in the "remove" buttons.
 java.lang.String removeColumnTitle
          The title on top of the columns with the "remove" buttons.
 java.lang.String totalColumns
          The number of the columns taht will be totalized, separated by &.
 java.lang.String totalLineLabel
          The String that will be displayed in the first column of the total line
 int totalMaximumFractionDigits
          The max number of fractionary digists given to DecimalFormat
 int totalMinimumFractionDigits
          The minimum number of fractionary digists given to DecimalFormat
 
Fields inherited from class com.oktiva.mogno.html.Table
align, border, cellpadding, cellspacing, dir, frame, lang, onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, rules, summary, width
 
Fields inherited from class com.oktiva.mogno.Container
afterEnd, content
 
Fields inherited from class com.oktiva.mogno.Visual
evOnShow, evOnSyntaxError, gridHeight, gridWeightX, gridWeightY, gridWidth, id, lastError, left, parent, problematic, style, styleClass, title, top
 
Fields inherited from class com.oktiva.mogno.Component
bag, componentFiler, componentFilerParams, designing, eventQueue, evOnCreate, name, owned, ownedClasses, owner, tag, xmlFileName
 
Constructor Summary
SimpleTable()
           
 
Method Summary
 void addRowData(java.util.Vector rowData)
           
 java.lang.String endContainer()
          Ends container's tag.
 boolean getActive()
           
 java.lang.String getColumnIdentifiers()
           
 java.util.Vector getDataVector()
          Getter for property dataVector.
 java.lang.String getEditableColumns()
          Getter for property editableColumns.
 java.lang.String getEvOnRemoveRow()
           
 java.lang.String getHiddenColumns()
          Getter for property hiddenColumns.
 java.lang.String getRemoveButtonLabel()
           
 java.lang.String getRemoveColumnTitle()
           
 java.util.Vector getRemovedRow()
          Returns the row that was clicked to be removed.
 java.lang.String getTotalColumns()
          Getter for property totalColumns.
 java.lang.String getTotalLineLabel()
          Getter for property totalLineLabel.
 int getTotalMaximumFractionDigits()
          Getter for property totalMaximumFractionDigits.
 int getTotalMinimumFractionDigits()
          Getter for property totalMinimumFractionDigits.
 void receiveRequest(javax.servlet.http.HttpServletRequest request)
          Receive the request and rebuild the properties using the data that the user has filled in.
 Component selectParentComponent()
          The parent component: this one or his owner.
 void setActive(boolean active)
           
 void setColumnIdentifiers(java.lang.String columnIdentifiers)
           
 void setDataVector(java.util.Vector dataVector)
          Setter for property dataVector.
 void setEditableColumns(java.lang.String editableColumns)
          Colum numbers wich should be turnned into text inputs, separated by &
 void setEvOnRemoveRow(java.lang.String evOnRemoveRow)
           
 void setHiddenColumns(java.lang.String hiddenColumns)
          Setter for property hiddenColumns.
 void setRemoveButtonLabel(java.lang.String removeButtonLabel)
           
 void setRemoveColumnTitle(java.lang.String removeColumnTitle)
           
 void setTotalColumns(java.lang.String totalColumns)
          Setter for property totalColumns.
 void setTotalLineLabel(java.lang.String totalLineLabel)
          Setter for property totalLineLabel.
 void setTotalMaximumFractionDigits(int totalMaximumFractionDigits)
          Setter for property totalMaximumFractionDigits.
 void setTotalMinimumFractionDigits(int totalMinimumFractionDigits)
          Setter for property totalMinimumFractionDigits.
 java.lang.String show()
          Builds the HTML from the ordered childs list.
 
Methods inherited from class com.oktiva.mogno.html.Table
getAlign, getBorder, getCellpadding, getCellspacing, getDir, getFrame, getLang, getOnclick, getOndblclick, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getRules, getSummary, getWidth, htmlAttributes, setAlign, setBorder, setCellpadding, setCellspacing, setDir, setFrame, setLang, setOnclick, setOndblclick, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setRules, setSummary, setWidth
 
Methods inherited from class com.oktiva.mogno.Container
addChildsVector, betweenColumns, betweenRows, endColumn, endRow, getChildsVector, getContent, getFullComponentsVector, getOrderedChildNames, getOrderedChildsVector, nonAttributeGetters, orderChildsVector, setContent, startColumn, startContainer, startRow
 
Methods inherited from class com.oktiva.mogno.Visual
buildHtmlAttributes, cellhalignHtmlAttributes, cellvalignHtmlAttributes, checkSyntax, coreHtmlAttributes, descendentOf, eventsHtmlAttributes, getEvOnShow, getEvOnSyntaxError, getGridHeight, getGridWeightX, getGridWeightY, getGridWidth, getId, getLastError, getLeft, getParent, getStyle, getStyleClass, getTitle, getTop, i18nHtmlAttributes, localizableAttributes, setEvOnShow, setEvOnSyntaxError, setGridHeight, setGridWeightX, setGridWeightY, setGridWidth, setId, setLastError, setLeft, setParent, setStyle, setStyleClass, setTitle, setTop, showHtmlAttributes
 
Methods inherited from class com.oktiva.mogno.Component
attribsHash, createOwnedComponents, dispatch, dispatchAll, dispatchFunction, eventParamTypes, eventParamValues, freeChild, getApplication, getAttrsTypes, getBag, getChild, getChildClass, getClone, getEvOnCreate, getFromBag, getName, getOwner, initialize, initialize, initialize, initialize, isDesigning, listChilds, putInBag, queue, registerChild, removeFromBag, serializedBag, setBag, setComponentFiler, setComponentFilerParams, setDesigning, setEvOnCreate, setName, setOwner, setProperties, store, unserializeBag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dataVector

protected java.util.Vector dataVector
Vector of Vectors with the table data.


columnIdentifiers

public java.lang.String columnIdentifiers
String with the comumn's names and widths, in the following format:
name1|attr1=val1|attr2=val2&name2|attr3=val3...


editableColumns

public java.lang.String editableColumns

hiddenColumns

public java.lang.String hiddenColumns

removeColumnTitle

public java.lang.String removeColumnTitle
The title on top of the columns with the "remove" buttons.


evOnRemoveRow

public java.lang.String evOnRemoveRow

active

public boolean active
Activate/deactivate this SimpleList. An inactive SimpleList don't submit any data and has no "del" button.


removeButtonLabel

public java.lang.String removeButtonLabel
The label to show in the "remove" buttons.


totalLineLabel

public java.lang.String totalLineLabel
The String that will be displayed in the first column of the total line


totalColumns

public java.lang.String totalColumns
The number of the columns taht will be totalized, separated by &.


totalMaximumFractionDigits

public int totalMaximumFractionDigits
The max number of fractionary digists given to DecimalFormat


totalMinimumFractionDigits

public int totalMinimumFractionDigits
The minimum number of fractionary digists given to DecimalFormat

Constructor Detail

SimpleTable

public SimpleTable()
Method Detail

getColumnIdentifiers

public java.lang.String getColumnIdentifiers()

setColumnIdentifiers

public void setColumnIdentifiers(java.lang.String columnIdentifiers)

getHiddenColumns

public java.lang.String getHiddenColumns()
Getter for property hiddenColumns.

Returns:
Value of property hiddenColumns.

setHiddenColumns

public void setHiddenColumns(java.lang.String hiddenColumns)
Setter for property hiddenColumns. String with the number of the columns which should not be displayed, but must have its data included Column numbers should be separated by & as usual.

Parameters:
hiddenColumns - New value of property hiddenColumns.

getRemoveColumnTitle

public java.lang.String getRemoveColumnTitle()

setRemoveColumnTitle

public void setRemoveColumnTitle(java.lang.String removeColumnTitle)

getEvOnRemoveRow

public java.lang.String getEvOnRemoveRow()

setEvOnRemoveRow

public void setEvOnRemoveRow(java.lang.String evOnRemoveRow)

getActive

public boolean getActive()

setActive

public void setActive(boolean active)

getRemoveButtonLabel

public java.lang.String getRemoveButtonLabel()

setRemoveButtonLabel

public void setRemoveButtonLabel(java.lang.String removeButtonLabel)

selectParentComponent

public Component selectParentComponent()
Description copied from class: Container
The parent component: this one or his owner.

Overrides:
selectParentComponent in class Container
Returns:
(Component)owner==null?this:owner

show

public java.lang.String show()
                      throws java.lang.Exception
Description copied from class: Container
Builds the HTML from the ordered childs list. When a component has gridWidth or gridHeight, the number of startColumns, endColumns, startRow and endRows called will still depend of the last top and left. Ex.: If you have a component with left 0 and gridWidth 2 and you have another component with left 2, there will be three calls to startColumn

Overrides:
show in class Container
Throws:
java.lang.Exception

endContainer

public java.lang.String endContainer()
Description copied from class: Container
Ends container's tag.
If the tag attribute is not null, assumes the default behavior:
< + tag + htmlAttributes + >

Overrides:
endContainer in class Container
Returns:
String

receiveRequest

public void receiveRequest(javax.servlet.http.HttpServletRequest request)
Description copied from class: Visual
Receive the request and rebuild the properties using the data that the user has filled in. This is a stub method

Overrides:
receiveRequest in class Visual
Parameters:
request - HttpServletRequest

addRowData

public void addRowData(java.util.Vector rowData)

getDataVector

public java.util.Vector getDataVector()
Getter for property dataVector.

Returns:
Value of property dataVector.

setDataVector

public void setDataVector(java.util.Vector dataVector)
Setter for property dataVector.

Parameters:
dataVector - New value of property dataVector.

getEditableColumns

public java.lang.String getEditableColumns()
Getter for property editableColumns.

Returns:
Value of property editableColumns.

setEditableColumns

public void setEditableColumns(java.lang.String editableColumns)
Colum numbers wich should be turnned into text inputs, separated by &

Parameters:
editableColumns - New value of property editableColumns.

getRemovedRow

public java.util.Vector getRemovedRow()
Returns the row that was clicked to be removed.

Returns:
Vector with the row data

getTotalLineLabel

public java.lang.String getTotalLineLabel()
Getter for property totalLineLabel.

Returns:
Value of property totalLineLabel.

setTotalLineLabel

public void setTotalLineLabel(java.lang.String totalLineLabel)
Setter for property totalLineLabel.

Parameters:
totalLineLabel - New value of property totalLineLabel.

getTotalColumns

public java.lang.String getTotalColumns()
Getter for property totalColumns.

Returns:
Value of property totalColumns.

setTotalColumns

public void setTotalColumns(java.lang.String totalColumns)
Setter for property totalColumns.

Parameters:
totalColumns - New value of property totalColumns.

getTotalMaximumFractionDigits

public int getTotalMaximumFractionDigits()
Getter for property totalMaximumFractionDigits.

Returns:
Value of property totalMaximumFractionDigits.

setTotalMaximumFractionDigits

public void setTotalMaximumFractionDigits(int totalMaximumFractionDigits)
Setter for property totalMaximumFractionDigits.

Parameters:
totalMaximumFractionDigits - New value of property totalMaximumFractionDigits.

getTotalMinimumFractionDigits

public int getTotalMinimumFractionDigits()
Getter for property totalMinimumFractionDigits.

Returns:
Value of property totalMinimumFractionDigits.

setTotalMinimumFractionDigits

public void setTotalMinimumFractionDigits(int totalMinimumFractionDigits)
Setter for property totalMinimumFractionDigits.

Parameters:
totalMinimumFractionDigits - New value of property totalMinimumFractionDigits.