Project Wonder 2.0

er.extensions
Class ERXTable

java.lang.Object
  extended bycom.webobjects.appserver.WOElement
      extended bycom.webobjects.appserver.WOComponent
          extended byer.extensions.WOTable
              extended byer.extensions.ERXTable
All Implemented Interfaces:
Cloneable, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, Serializable, WOActionResults

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
           
row pushed to the parent with the current row number
           
item pushed to the parent with the current object from the list
           
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
           
cellBackgroundColor background color for the cell
           
cellAlign cell's alignment
           
cellVAlign cell's vertical alignment
           
cellWidth cell's width
           
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 inherited from class com.webobjects.appserver.WOComponent
WOComponent._EventLoggingEnabler, WOComponent.Event
 
Nested classes inherited from class com.webobjects.foundation.NSKeyValueCoding
NSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.DefaultImplementation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.Null, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.Utility, NSKeyValueCoding.ValueAccessor
 
Nested classes inherited from class com.webobjects.foundation.NSKeyValueCodingAdditions
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
 
Nested classes inherited from class com.webobjects.foundation.NSValidation
NSValidation._MethodBinding, NSValidation._ValidationBinding, NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException
 
Field Summary
protected  Boolean _goingVertically
          caches the value from the binding goingVertical
protected  Boolean _showIndex
           
protected  String header
          used in the repetition for header images
protected  int index
           
 
Fields inherited from class er.extensions.WOTable
currentCol, currentItemIndex, currentRow
 
Fields inherited from class com.webobjects.appserver.WOComponent
_Extension, _IsEventLoggingEnabled, _keyAssociations
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
_CLASS, NullValue
 
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.NSValidation
_CLASS
 
Constructor Summary
ERXTable(WOContext context)
          Public constructor
 
Method Summary
protected  void _resetInternalCaches()
          resets the cached variables
 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.
 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.WOTable
colCount, 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 String header
used in the repetition for header images


_goingVertically

protected Boolean _goingVertically
caches the value from the binding goingVertical


_showIndex

protected Boolean _showIndex

index

protected int index
Constructor Detail

ERXTable

public ERXTable(WOContext context)
Public constructor

Parameters:
context - the context
Method Detail

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: Do, Dez 9, 2004 • 12:46 PM CET

Copyright © 2002 – 2004 Project Wonder.