myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marko Asplund (JIRA)" <>
Subject [jira] Created: (TOMAHAWK-925) Improve Tree2 data model usability
Date Tue, 06 Mar 2007 20:01:24 GMT
Improve Tree2 data model usability

                 Key: TOMAHAWK-925
             Project: MyFaces Tomahawk
          Issue Type: Improvement
          Components: Tree2
    Affects Versions: 1.1.5-SNAPSHOT
            Reporter: Marko Asplund

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
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()) {
      MyNode n = (MyNode)tree.getRowData();
      // ...
    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.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message