Project Wonder 5.0

er.extensions.components
Class ERXTable

java.lang.Object
  extended by com.webobjects.appserver.WOElement
      extended by com.webobjects.appserver.WOComponent
          extended by er.extensions.woextensions.WOTable
              extended by er.extensions.components.ERXTable
All Implemented Interfaces:
com.webobjects.appserver.WOActionResults, com.webobjects.foundation.NSKeyValueCoding, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCodingAdditions, com.webobjects.foundation.NSValidation, java.io.Serializable, java.lang.Cloneable

public class ERXTable
extends WOTable

Enhanced table component that adds the ability to have the table layed out in a vertical orientation and adds the ability to specify an array of header images that appear in the header cells of the table. Corrects a bug intorduced in WO 5.1 where OutOfBounds exceptions are thrown. Note that this component subclasses WOTable from this framework, not the WOTable in com.webobjects.woextensions. The reason for this is that all of the instance variables are private in JavaWOExtensions WOTable.

Synopsis:
list=anArray;item=aSettableObject;[col=aSettableNumber;][index=aSettableNumber;][row=aSettableNumber;] [maxColumns=aNumber;][tableBackgroundColor=aString;][border=aNumber;][cellpadding=aNumber;][cellspacing=aNumber;] [rowBackgroundColor=aString;][cellBackgroundColor=aString;][cellAlign=aNumber;][cellVAlign=aNumber;] [cellWidth=aNumber;][tableWidth=aNumber;] [goingVertically=aBoolean;][headerImages=anArray;][headerRowBackgroundColor=aColor;]

See Also:
Serialized Form
Bindings
col pushed to the parent with the current column number
           
index pushed to the parent indicating the current index
           
list of objects to construct the table for
           
maxColumns maximum number of columns
           
fillColumns when true, loops until the last row is filled even when no more elements are left in the list
           
row pushed to the parent with the current row number
           
item pushed to the parent with the current object from the list
           
tableClass CSS class for the table
           
tableBackgroundColor background color for table
           
border table border
           
cellpadding cell padding
           
cellspacing cell spacing
           
rowBackgroundColor background color to be used for the rows of the table
           
rowClass CSS class for the row
           
cellBackgroundColor background color for the cell
           
cellAlign cell's alignment
           
cellVAlign cell's vertical alignment
           
cellWidth cell's width
           
cellClass CSS class for the cell
           
tableWidth table width
           
goingVertically boolean if the list should be layed out horizontally or vertically.
           
headerImages array of images to be displayed in the header cells of the table
           
headerRowBackgroundColor background color for the header row
           

Nested Class Summary
 
Nested classes/interfaces inherited from class com.webobjects.appserver.WOComponent
com.webobjects.appserver.WOComponent._EventLoggingEnabler, com.webobjects.appserver.WOComponent.Event
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
com.webobjects.foundation.NSKeyValueCodingAdditions.DefaultImplementation, com.webobjects.foundation.NSKeyValueCodingAdditions.Utility
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCoding
com.webobjects.foundation.NSKeyValueCoding._BooleanFieldBinding, com.webobjects.foundation.NSKeyValueCoding._BooleanMethodBinding, com.webobjects.foundation.NSKeyValueCoding._FieldBinding, com.webobjects.foundation.NSKeyValueCoding._ForwardingBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding._MethodBinding, com.webobjects.foundation.NSKeyValueCoding._NumberFieldBinding, com.webobjects.foundation.NSKeyValueCoding._NumberMethodBinding, com.webobjects.foundation.NSKeyValueCoding._ReflectionKeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCoding.Null, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.NSKeyValueCoding.ValueAccessor
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation
com.webobjects.foundation.NSValidation._MethodBinding, com.webobjects.foundation.NSValidation._ValidationBinding, com.webobjects.foundation.NSValidation.DefaultImplementation, com.webobjects.foundation.NSValidation.Utility, com.webobjects.foundation.NSValidation.ValidationException
 
Field Summary
protected  java.lang.Boolean _goingVertically
          caches the value from the binding goingVertical
protected  java.lang.Boolean _showIndex
           
protected  java.lang.String header
          used in the repetition for header images
protected  int index
           
 
Fields inherited from class er.extensions.woextensions.WOTable
_colCount, _list, _maxColumns, _rowCount, currentCol, currentItemIndex, currentRow
 
Fields inherited from class com.webobjects.appserver.WOComponent
_Extension, _IsEventLoggingEnabled, _keyAssociations
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding.ErrorHandling
_CLASS
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
NullValue
 
Fields inherited from interface com.webobjects.foundation.NSValidation
_CLASS
 
Constructor Summary
ERXTable(com.webobjects.appserver.WOContext context)
          Public constructor
 
Method Summary
protected  void _resetInternalCaches()
          resets the cached variables
 int colCount()
           
 int displayInt()
          Returns a displayable value for the index starting from 1 instead of 0.
 boolean goingVertically()
          Denotes if the list should be layed out vertically or horizontally.
 boolean hasHeaders()
          Conditional to determine if the binding: headerImages is present.
 java.lang.String header()
           
 boolean isStateless()
          Component is stateless.
 void pushItem()
          Overridden to account for when goingVertical is enabled.
 boolean showIndex()
          Conditional to determine if the index should be shown
 
Methods inherited from class er.extensions.woextensions.WOTable
list, maxColumns, reset, rowCount, setCurrentCol, setCurrentRow, takeValuesFromRequest
 
Methods inherited from class com.webobjects.appserver.WOComponent
_associationWithName, _awakeInContext, _childTemplate, _componentDefinition, _componentUnroll, _isPage, _setContext, _setIsPage, _setParent, _setSubcomponent, _sleepInContext, _subcomponentForElementWithID, _templateNameForClass, _unroll, appendToResponse, application, awake, baseURL, bindingKeys, canAccessFieldsDirectly, canGetValueForBinding, canSetValueForBinding, clone, context, debugString, descriptionForResponse, ensureAwakeInContext, frameworkName, generateResponse, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasBinding, hasSession, invokeAction, isCachingEnabled, isEventLoggingEnabled, logString, name, pageWithName, parent, path, pathURL, performParentAction, pullValuesFromParent, pushValuesToParent, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, sleep, synchronizesVariablesWithBindings, takeValueForKey, takeValueForKeyPath, template, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForKey, valueForKeyPath
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

header

protected java.lang.String header
used in the repetition for header images


_goingVertically

protected java.lang.Boolean _goingVertically
caches the value from the binding goingVertical


_showIndex

protected java.lang.Boolean _showIndex

index

protected int index
Constructor Detail

ERXTable

public ERXTable(com.webobjects.appserver.WOContext context)
Public constructor

Parameters:
context - the context
Method Detail

header

public java.lang.String header()

colCount

public int colCount()
Overrides:
colCount in class WOTable

isStateless

public boolean isStateless()
Component is stateless.

Overrides:
isStateless in class WOTable
Returns:
true

_resetInternalCaches

protected void _resetInternalCaches()
resets the cached variables

Overrides:
_resetInternalCaches in class WOTable

goingVertically

public boolean goingVertically()
Denotes if the list should be layed out vertically or horizontally. This is the boolean value from the binding: goingVertically

Returns:
if the list of items should be layed out vertically.

pushItem

public void pushItem()
Overridden to account for when goingVertical is enabled. Also corrects a bug from the WO 5.1 release that would throw OutOfBoundsExceptions. This method pushs the current item up to the parent component.

Overrides:
pushItem in class WOTable

hasHeaders

public boolean hasHeaders()
Conditional to determine if the binding: headerImages is present.

Returns:
if the component has the binding headerImages.

showIndex

public boolean showIndex()
Conditional to determine if the index should be shown

Returns:
if the index should be shown from the bindings

displayInt

public int displayInt()
Returns a displayable value for the index starting from 1 instead of 0.

Returns:
a displayable value for the index starting from 1 instead of 0.

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.