<w:OutlineRepetition>

AWXOutlineRepetition is like AWRepetition, but for hierarchical (outline/tree) structures -- i.e. those that where an item may have children.

Example usage:

<w:OutlineRepetition list="$rootItems" item="$currentObject"
                     children="$childrenOfCurrentObject"
                     hasChildren="$hasChildren">
    <div style="padding-top:4px"><w:OutlineControl title="$currentObject.name"/></div>
</w:OutlineRepetition>

There is a special (behind the scenes) relationship between AWXOutlineControl and AWXOutlineRepetition -- the OutlineControl looks to its containing OutlineRepetition to determine nesting-level (indentation), whether it hasChildren (i.e. should display an expansion arrow), etc.

Behind the scenes the OutlineRepetition uses the AWXOutlineState to handle most of the heavy lifting (includingsorting, tracking which nodes are open, etc). Bind to it directly to get detail.

Note also that AWXOutlineRepetition is used inside AWTDataTable for tables that display an tree in one of the columns. DataTable simply passing on its outline-related bindings to its OutlineRepetition.

Bindings
item

The current item in the repetition. The tail of outlineState.currentPath() reflects this value.

Object
(set)
list

The list (Vector, Java Array, ...).

AWOrderedList
(get)
children

Should return the array of child objects for the current item.

Bind 'hasChildren' to avoid unnecessary calls to this binding.

AWOrderedList
(get)
hasChildren

Should indicate whether the current item has children (i.e. is "expandable"). If not implemented, $^children.count will be used instead. Implementing hasChildren will cause 'children' to be evaluated only if a node is actually expanded (important if you are doing lazy fetching).

boolean
(get)
outlineState

AWXOutlineState object that manages the state for the OutlineRepetition. Uses the one provide if bound (and not null), creates and pushes otherwise.

AWXOutlineState
(both)
selectionPath

If bound, selectionPath with pre-open the path, and select the tail object. When a node is opened/closed the path to that node is pushed to this binding.

List
(both)
selectedObject

Bound to outlineState.selectedObject() -- i.e. the most recent selected object.

todo: this should probably be changed to "selection" to be consistent with other parts of system

Object
(both)
expandAll

Pre-open all tree nodes.

This is ignored if we're in "print mode."

boolean
(get)
maxLevels

When doing expandAll, the max number of levels that will be pre-opened.

int
(get)
outlineIndex

The overall index of the current item (independent of nesting).

Note: we did not use "index" for this binding because, unlike other uses of index this does not map to a valid index within the provided "list". todo: this should be changed to "index" to be consistent with other parts of system

int
(set)
expandCurrentItem

Whether to force open the current item. Note that if expandCurrentItem returns true, the corresponding outline item will be stuck open - i.e. user clicks on that node will not expand the item (thus this option is best used together with showExpansionControl="$false").

To just initially expand a node, get the outlineState and call setExpansionState(node, true).

boolean
(get)
showExpansionControl

Whether to show the expansion control (can be used in concert with expandCurrentItem to display a set of children that must always be displayed).

boolean
(get)
fullList

If bound, the OutlineRepetition will fully "unwind" the items in the outline (as they will be rendered) and push the fully flattened array. The 'start' and 'count' bindings can then be used to limit the subset of these items that will be rendered.

This is used by AWTDataTable to do scroll faulting.

List
(set)
start

As with AWRepetition, this indicates the item index (relative to the flattened fullList) to begin rendering.

int
(get)
count

As with AWRepetition, this indicates how many items after start (see above) to render.

int
(get)
scopeSubcomponentsByItem

Whether stateful subcomponents in table cells should be scoped based on item/column (instead of position). In the AW default behavior (positional), the addition of a column or row will cause a shift in the position of objects relative to the stateful components which will cause a different (and possibly incorrect) subcomponent to be used for the object.

boolean
(get)

ariba.ui.outline
Class OutlineRepetition

java.lang.Object
  extended by ariba.ui.aribaweb.util.AWBaseObject
      extended by ariba.ui.aribaweb.core.AWComponent
          extended by ariba.ui.outline.OutlineRepetition
All Implemented Interfaces:
AWCycleable, AWCycleableReference, AWResponseGenerating, AWResponseGenerating.ResponseSubstitution, AWObject

public final class OutlineRepetition
extends AWComponent


Nested Class Summary
 
Nested classes/interfaces inherited from class ariba.ui.aribaweb.core.AWComponent
AWComponent.RenderingFilter, AWComponent.RenderingListener
 
Nested classes/interfaces inherited from interface ariba.ui.aribaweb.core.AWResponseGenerating
AWResponseGenerating.ResponseSubstitution
 
Constructor Summary
OutlineRepetition()
           
 
Method Summary
 void applyValues(AWRequestContext requestContext, AWComponent component)
          The receiver should take any form values (or query string parameters) that it owns from the AWRequestContext.request().
static OutlineRepetition currentInstance(AWComponent currentComponent)
           
 java.lang.Object currentItem()
           
 java.lang.Object currentItemChildren()
           
 int currentItemChildrenCount()
           
 void decrementNestingLevel()
           
 boolean hideImages()
           
 void incrementNestingLevel()
           
 void incrementOutlineIndex()
           
 void init()
           
 AWResponseGenerating invokeAction(AWRequestContext requestContext, AWComponent component)
          The receiver should determine if it is the intended recipient of the current action (by checking the AWRequestContext.request() AWRequest.senderId()) and, if so, handle the action and return the result.
 boolean isExpanded()
           
 boolean isStateless()
          Overridden by AWComponent subclasses to indicate whether component instances should be preserved with the page/session (i.e.
 int nestingLevel()
           
 void renderResponse(AWRequestContext requestContext, AWComponent component)
          The receiver should render its content to the AWRequestContext.response()
 java.lang.Object rootList()
           
 java.lang.Object selectedObject()
           
 void setCurrentItem(java.lang.Object item)
           
 void setSelectedObject(java.lang.Object object)
           
 void setSelectionPath(java.util.List path)
           
 boolean shouldRender()
           
 AWComponent toggleExpansion()
           
 
Methods inherited from class ariba.ui.aribaweb.core.AWComponent
_topLevelApplyValues, _topLevelInvokeAction, _topLevelRenderResponse, allowEmbeddedKeyPaths, allowsWhitespaceCompression, application, awcyclePageAndLog, bindingForName, bindingForName, bindings, booleanValueForBinding, booleanValueForBinding, booleanValueForBinding, booleanValueForBinding, browserMaxWidth, browserMinWidth, characterEncoding, clearValidationError, clientTimeZone, componentConfiguration, componentDefinition, componentPath, componentReference, createPageWithName, defaultTemplateParser, determineInstance, determineInstance, dict, dict, dict, doubleValueForBinding, doubleValueForBinding, doubleValueForBinding, encodedStringValueForBinding, encodedStringValueForBinding, ensureAwake, ensureFieldValuesClear, env, errorManager, escapeAttribute, escapeString, escapeUnsafeString, extendedFields, formValueManager, generateResponse, generateResponse, generateResponse, generateStringContents, getAWParameter, getDrivingBusinessObject, getFoldInSituOnWindowSizeParam, getPageRenderVersion, getThis, hasBinding, hasBinding, hasContentForTagName, hasContentNamed, hasMultipleTemplates, hasSubTemplateNamed, httpSession, init, initTemplateResourceManager, intValueForBinding, intValueForBinding, intValueForBinding, isBidirectional, isBrowserMicrosoft, isClientPanel, isMacintosh, isRenderAW5, isStrictTagNaming, isUserCommunityEnabled, isValidationEnabled, languageDirection, languageLeft, languageRight, loadTemplate, localizedJavaString, markBacktrackState, name, namePath, notifyChange, otherBindings, otherBindingsValues, page, pageComponent, pageWithClass, pageWithClass, pageWithName, pageWithName, parent, postTakeValueActions, preferredLocale, recordBacktrackState, recordBacktrackState, recordValidationError, recordValidationError, recordValidationError, recordValidationErrors, recordValidationWarning, redirectToPage, registerRenderingListener, registerXmlNodeWithName, removeBacktrackState, replacementResponse, request, requestContext, requiresPreGlidCompatibility, resourceClassName, resourceManager, response, restoreFromBacktrackState, session, session, setCharacterEncoding, setClientPanel, setClientTimeZone, setComponentConfiguration, setDefaultTemplateParser, setEnv, setPerfDestinationInfo, setPreferredLocale, setResourceManager, setTemplateParser, setupForNextCycle, setValueForBinding, setValueForBinding, setValueForBinding, setValueForBinding, setValueForBinding, setValueForBinding, shouldCachePage, shouldCloseElements, strings, stringValueForBinding, stringValueForBinding, stringValueForBinding, supportedBindingNames, template, templateName, templateParser, templateResource, templateResourceManager, truncateBacktrackState, truncateBacktrackState, urlForResourceNamed, urlForResourceNamed, urlForResourceNamed, useXmlEscaping, valueForBinding, valueForBinding, valueForBinding, xml
 
Methods inherited from class ariba.ui.aribaweb.util.AWBaseObject
debugString, getFieldValue, isKindOfClass, localizedJavaString, logString, logWarning, setFieldValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ariba.ui.aribaweb.util.AWObject
getFieldValue, isKindOfClass, setFieldValue
 

Field Detail

_fullList

public AWBinding _fullList

_hasChildren

public boolean _hasChildren
Constructor Detail

OutlineRepetition

public OutlineRepetition()
Method Detail

currentInstance

public static OutlineRepetition currentInstance(AWComponent currentComponent)

isStateless

public boolean isStateless()
Description copied from class: AWComponent
Overridden by AWComponent subclasses to indicate whether component instances should be preserved with the page/session (i.e. are "stateful") or can be pooled and reused for each phase of request processing (i.e. are stateless) Default is to be stateless unless the component is used as the top-level (page) component.

Overrides:
isStateless in class AWComponent

init

public void init()
Specified by:
init in interface AWObject
Overrides:
init in class AWComponent

applyValues

public void applyValues(AWRequestContext requestContext,
                        AWComponent component)
Description copied from interface: AWCycleable
The receiver should take any form values (or query string parameters) that it owns from the AWRequestContext.request().

Specified by:
applyValues in interface AWCycleable
Overrides:
applyValues in class AWComponent
Parameters:
requestContext - the context for the current request.
component - the current parent component

invokeAction

public AWResponseGenerating invokeAction(AWRequestContext requestContext,
                                         AWComponent component)
Description copied from interface: AWCycleable
The receiver should determine if it is the intended recipient of the current action (by checking the AWRequestContext.request() AWRequest.senderId()) and, if so, handle the action and return the result.

Specified by:
invokeAction in interface AWCycleable
Overrides:
invokeAction in class AWComponent
Parameters:
requestContext - the context for the current request.
component - the current parent component
Returns:
the response for the action

renderResponse

public void renderResponse(AWRequestContext requestContext,
                           AWComponent component)
Description copied from interface: AWCycleable
The receiver should render its content to the AWRequestContext.response()

Specified by:
renderResponse in interface AWCycleable
Overrides:
renderResponse in class AWComponent
Parameters:
requestContext - the context for the current request.
component - the current parent component

rootList

public java.lang.Object rootList()

setCurrentItem

public void setCurrentItem(java.lang.Object item)

currentItem

public java.lang.Object currentItem()

currentItemChildren

public java.lang.Object currentItemChildren()

currentItemChildrenCount

public int currentItemChildrenCount()

isExpanded

public boolean isExpanded()

shouldRender

public boolean shouldRender()

selectedObject

public java.lang.Object selectedObject()

setSelectedObject

public void setSelectedObject(java.lang.Object object)

toggleExpansion

public AWComponent toggleExpansion()

setSelectionPath

public void setSelectionPath(java.util.List path)

nestingLevel

public int nestingLevel()

incrementNestingLevel

public void incrementNestingLevel()

decrementNestingLevel

public void decrementNestingLevel()

hideImages

public boolean hideImages()

incrementOutlineIndex

public void incrementOutlineIndex()


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.