|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
To just initially expand a node, get the |
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) |
java.lang.Objectariba.ui.aribaweb.util.AWBaseObject
ariba.ui.aribaweb.core.AWComponent
ariba.ui.outline.OutlineRepetition
public final class OutlineRepetition
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.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 |
---|
public AWBinding _fullList
public boolean _hasChildren
Constructor Detail |
---|
public OutlineRepetition()
Method Detail |
---|
public static OutlineRepetition currentInstance(AWComponent currentComponent)
public boolean isStateless()
AWComponent
isStateless
in class AWComponent
public void init()
init
in interface AWObject
init
in class AWComponent
public void applyValues(AWRequestContext requestContext, AWComponent component)
AWCycleable
AWRequestContext.request()
.
applyValues
in interface AWCycleable
applyValues
in class AWComponent
requestContext
- the context for the current request.component
- the current parent componentpublic AWResponseGenerating invokeAction(AWRequestContext requestContext, AWComponent component)
AWCycleable
AWRequestContext.request()
AWRequest.senderId()
) and,
if so, handle the action and return the result.
invokeAction
in interface AWCycleable
invokeAction
in class AWComponent
requestContext
- the context for the current request.component
- the current parent component
public void renderResponse(AWRequestContext requestContext, AWComponent component)
AWCycleable
AWRequestContext.response()
renderResponse
in interface AWCycleable
renderResponse
in class AWComponent
requestContext
- the context for the current request.component
- the current parent componentpublic java.lang.Object rootList()
public void setCurrentItem(java.lang.Object item)
public java.lang.Object currentItem()
public java.lang.Object currentItemChildren()
public int currentItemChildrenCount()
public boolean isExpanded()
public boolean shouldRender()
public java.lang.Object selectedObject()
public void setSelectedObject(java.lang.Object object)
public AWComponent toggleExpansion()
public void setSelectionPath(java.util.List path)
public int nestingLevel()
public void incrementNestingLevel()
public void decrementNestingLevel()
public boolean hideImages()
public void incrementOutlineIndex()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |