|
UIX 2.2.16 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.cabo.ui.data.tree.BaseTreeDataProxy | +--oracle.cabo.ui.data.tree.DynamicHGridDataProxy
This DataProxy sits between an HGrid renderer and its data. It is used to produce dynamic views of the static tree that is rendered by HGrid. A DataProxy object must be created for each view of the data.
See the ClientStateHGridDataProxy
for a detailed discussion of how
an hGrid proxy works.
This proxy differs from the ClientStateHGridDataProxy
in that unique
IDs are used to identify tree nodes rather than indices. This allows dynamic
rather than static data. This also means that wherever a numeric index was
used before, an ID string is now required. Every expandable node MUST have
an ID! A node ID may consist of any alphanumeric character, a dash (-) and
underbar (_) other characters may work, but are not supported. The colon (:)
and slash (/) characters are explicitly disallowed.
The focusRoot path is a string of node IDs delimited by the
path separator character
,
or an array of nodeIDs.
!!! Important Note: The state string for this proxy has to name all the nodes that are currently expanded! Your nodeIDs must be unique (for the hGrid, not necessarily for the page), but you are advised to use node IDs that are as short as possible! Furthermore, you are advised not to allow expandAll or collapseAll for any but small hGrids. Only expandable nodes need to have IDs (leaf nodes do not).
Field Summary | |
static java.lang.String |
EXPAND_ALL_KEY
the key to examine when deciding the feasibility of performing an expand-all. |
static java.lang.String |
PATH_SEPARATOR
The string used to delimit elements on the focus root path string. |
Constructor Summary | |
DynamicHGridDataProxy()
|
|
DynamicHGridDataProxy(java.lang.String focusRootPath)
Constructs a proxy that produces an HGrid that is initially focused on a given tree node. |
|
DynamicHGridDataProxy(java.lang.String[] focusRootPath)
Constructs a proxy that produces an HGrid that is initially focused on a given tree node. |
|
DynamicHGridDataProxy(java.lang.String state,
java.lang.String root)
Create a proxy in response to a focus
event |
|
DynamicHGridDataProxy(java.lang.String state,
java.lang.String root,
boolean expandAll)
Create a proxy in response to an expandAll (or collapseAll ) event |
|
DynamicHGridDataProxy(java.lang.String state,
java.lang.String root,
java.lang.String node)
Create a proxy in response to an expand
event |
|
DynamicHGridDataProxy(java.lang.String state,
java.lang.String root,
java.lang.String node,
boolean isPrevious)
Create a proxy in response to an next
or previous event |
Method Summary | |
void |
doPostRender(RenderingContext context,
UINode node)
renders the javascript needed by this proxy |
DataObjectList |
getBreadCrumbs(RenderingContext context,
DataObject root)
|
java.lang.String |
getCollapseAllDestination(RenderingContext context,
DataObject focusRoot)
Gets the destination of the collapse-all link in an HGrid. |
java.lang.String |
getCollapseDestination(RenderingContext context,
DataObject node,
int ignored)
Returns a destination that would collapse the tree at the indicated node. |
java.lang.String |
getEventDestination(RenderingContext context,
java.lang.String event,
DataObject node,
int ignored)
Returns a destination that would fire the event at the indicated node. |
java.lang.String |
getExpandable(RenderingContext context,
DataObject node,
int ignored)
Is the given node expandable? |
java.lang.String |
getExpandAllDestination(RenderingContext context,
DataObject focusRoot)
Gets the destination of the expand-all link in an HGrid. |
java.lang.String |
getExpandDestination(RenderingContext context,
DataObject node,
int ignored)
Returns a destination that would expand the tree at the indicated node. |
java.lang.String |
getFocusDestination(RenderingContext context,
DataObject node,
int ignoredIndex)
Returns a destination that would focus the HGrid at the indicated node. |
DataObject |
getFocusRoot(RenderingContext context,
DataObject root)
Gets the tree node that has the focus. |
int |
getViewNumber(RenderingContext context,
int ignoredIndex)
For large record sets it's expensive to display every row. |
boolean |
isExpandAllEnabled(RenderingContext context,
DataObject focusRoot)
checks to see if the expand/collapse-all links on this HGrid are enabled. |
void |
setBreadCrumbsEnabled(boolean isEnabled)
Use this method to hide the breadcrumbs. |
Methods inherited from class oracle.cabo.ui.data.tree.BaseTreeDataProxy |
getChildren, isSelected, selectionEnabled, setFormName, sharedInstance |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.cabo.ui.data.tree.TreeDataProxy |
getChildren, isSelected, selectionEnabled, setFormName |
Field Detail |
public static final java.lang.String EXPAND_ALL_KEY
isExpandAllEnabled(RenderingContext, DataObject)
public static final java.lang.String PATH_SEPARATOR
Constructor Detail |
public DynamicHGridDataProxy()
public DynamicHGridDataProxy(java.lang.String focusRootPath)
focusRootPath
- This describes the path from the root of the tree
to the subnode that must be the current focus root. This is a slash (/)
delimited string of nodeIDs.public DynamicHGridDataProxy(java.lang.String[] focusRootPath)
focusRootPath
- This describes the path from the root of the tree
to the subnode that must be the current focus root. Each element in this
array indicates the ID of the next child (folder) node.public DynamicHGridDataProxy(java.lang.String state, java.lang.String root)
focus
eventstate
- the encoded string with the current state of the tree.root
- this identifies the current focus root of the HGridjava.lang.IllegalArgumentException
- if the above strings are not well
formed.public DynamicHGridDataProxy(java.lang.String state, java.lang.String root, boolean expandAll)
expandAll
(or collapseAll
) eventstate
- the encoded string with the current state of the tree.root
- this identifies the current focus root of the HGrid. The
expand/collapse all takes place starting at this node.expandAll
- if true does an expand-all. Otherwise do a collapse-all.java.lang.IllegalArgumentException
- if the above strings are not well
formed.public DynamicHGridDataProxy(java.lang.String state, java.lang.String root, java.lang.String node)
expand
eventstate
- the encoded string with the current state of the tree.root
- this identifies the current focus root of the HGridnode
- this identifies the node that must be expanded/collapsedpublic DynamicHGridDataProxy(java.lang.String state, java.lang.String root, java.lang.String node, boolean isPrevious)
next
or previous
eventstate
- the encoded string with the current state of the tree.root
- this identifies the current focus root of the HGridnode
- this identifies the node that parent node whose view will be
scrolled.isPrevious
- this flag identifies the precipitating event as a
previous
if true,
or a next
event if false.Method Detail |
public void setBreadCrumbsEnabled(boolean isEnabled)
isEnabled
- The breadcrumbs are enabled by default. Setting this to
false will hide the breadcrumbs.java.lang.IllegalArgumentException
- if the breadcrumbs cannot be
disabled.public void doPostRender(RenderingContext context, UINode node) throws java.io.IOException
doPostRender
in interface TreeDataProxy
doPostRender
in class BaseTreeDataProxy
node
- the HGrid UINodepublic java.lang.String getFocusDestination(RenderingContext context, DataObject node, int ignoredIndex)
getFocusDestination
in interface HGridDataProxy
node
- the tree node.ignoredIndex
- ignored in this Dynamic implementation.public boolean isExpandAllEnabled(RenderingContext context, DataObject focusRoot)
HGridDataProxy
isExpandAllEnabled
in interface HGridDataProxy
focusRoot
- checks to see if it is feasible to completely expand
this focus root.focusRoot
has a property
EXPAND_ALL_KEY
and its value is not
Boolean.FALSE
EXPAND_ALL_KEY
,
Boolean.FALSE
public java.lang.String getExpandAllDestination(RenderingContext context, DataObject focusRoot)
HGridDataProxy
getExpandAllDestination
in interface HGridDataProxy
focusRoot
- The current focus of the HGridpublic java.lang.String getCollapseAllDestination(RenderingContext context, DataObject focusRoot)
HGridDataProxy
getCollapseAllDestination
in interface HGridDataProxy
focusRoot
- The current focus of the HGridpublic java.lang.String getEventDestination(RenderingContext context, java.lang.String event, DataObject node, int ignored)
getEventDestination
in interface HGridDataProxy
event
- the desired event.node
- the tree node.ignored
- Ignored for this implementationpublic java.lang.String getExpandDestination(RenderingContext context, DataObject node, int ignored)
getExpandDestination
in interface TreeDataProxy
getExpandDestination
in class BaseTreeDataProxy
node
- the tree nodeignored
- Ignored for this implementationpublic java.lang.String getCollapseDestination(RenderingContext context, DataObject node, int ignored)
getCollapseDestination
in interface TreeDataProxy
getCollapseDestination
in class BaseTreeDataProxy
node
- the tree nodeignored
- Ignored for this implementationpublic java.lang.String getExpandable(RenderingContext context, DataObject node, int ignored)
getExpandable
in interface TreeDataProxy
getExpandable
in class BaseTreeDataProxy
node
- the tree nodeignored
- Ignored for this implementationUIConstants.EXPANDABLE_NO
,
UIConstants.EXPANDABLE_ALWAYS
,
UIConstants.EXPANDABLE_EXPANDED
or
UIConstants.EXPANDABLE_COLLAPSED
public DataObject getFocusRoot(RenderingContext context, DataObject root)
HGridDataProxy
getFocusRoot
in interface HGridDataProxy
root
- the root of the HGrid tree.public DataObjectList getBreadCrumbs(RenderingContext context, DataObject root)
getBreadCrumbs
in interface HGridDataProxy
root
- the root of the treepublic int getViewNumber(RenderingContext context, int ignoredIndex)
HGridDataProxy
getViewNumber
in interface HGridDataProxy
ignoredIndex
- Ignored in this Dynamic implementation.
|
UIX 2.2.16 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |