Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.1.5-SNAPSHOT
-
None
-
None
Description
There're two specific issues that should be addressed in my opinion
1) if you use t:commandLink action inside t:tree2 it's very difficult to get hold of the actual node object that was clicked
2) not possible to use existing or business logic tree structures directly with t:tree2
1) Currently I'm constructing the TreeNode structure so that the identifiers are actually paths to the node from the root node (this special node id semantics doesn't seem to be documented). Then in a backing bean I use
TreeNode.getNodeById(selectedNodePath);
to get the actual node object reference. Since I'm required to assign the node path as the identifier, there's no fields in the structure for identifying the business id of the object. This forces me to always subclass TreeNodeBase.
Oracle ADF Faces af:tree / TreeModel is much more intuitive since it follows the standard JSF h:dataTable / DataModel API pattern:
public NavigatorBacking {
TreeModel tree;
public String nodeSelected() {
if(tree.isRowAvailable())
return "success";
}
}
2) the tree nodes are required to be of TreeNode type or its subclass. Suppose I have a tree hierarchy that I construct in the business tier and want to render this to the user through the UI. I need to rebuild the tree in the web tier with TreeNode nodes (and assign identifiers correctly). Typically one or more TreeNodeBase subclasses are also required. This adds development as well as performance overhead. AFAIK, the ADF Faces TreeModel (ChildPropertyTreeModel) can be populated with any JavaBeans based structure which makes it much more user friendly.
Attachments
Issue Links
- relates to
-
TOMAHAWK-924 Tree2 documentation fails to describe "identifier" concept
- Open