Topic
1 reply Latest Post - ‏2013-04-29T19:40:26Z by Ortwin
Ortwin
Ortwin
177 Posts
ACCEPTED ANSWER

Pinned topic SOLUTION: DojoTree presenting leaf nodes as expandable nodes

‏2013-04-16T10:12:27Z |

When moving to RBD8.5.1 we encountered a problem with the DojoTree.
The leaf nodes showed folder icons and a plus sign like they were expandable.
Even when using the by IBM provided example this was the case (see left tree in attachement).
It took quite some time to figure out how to fix this and at the end it appeared a minor tweak.

How to solve:
- Declare the DojoTree providing attribure 'children' as an empty array. (without this attribure EGL crashes)

Tree1 DojoTree{ layoutData = new GridLayoutData{ row = 1, column = 2 },
    text = "World", width = "200", showRoot = true, /* onClick ::= handleCity, */ children = []};

- Declare the DojoTreeNodes outside the declaration of the DojoTree

treeNodes DojoTreeNode[] = [
    new DojoTreeNode { id = "NA", text = "North America", children = [
        new DojoTreeNode { id = "CA", text = "Canada" },
        new DojoTreeNode { id = "US", text = "USA" }
    ]},      
    new DojoTreeNode { id = "EU", text = "Europe", children = [
         new DojoTreeNode { id = "GR", text = "Greece"},
         new DojoTreeNode { id = "IT", text = "Italy"}
    ]}
];

- Append the nodes to the tree

Tree1.appendChildren(treeNodes as Widget[]);

See the right tree in the attachement for the fixed version.

PMR opened: 51401 211 788.

Ortwin

Attachments

Updated on 2013-04-17T18:58:12Z at 2013-04-17T18:58:12Z by Ortwin
  • Ortwin
    Ortwin
    177 Posts
    ACCEPTED ANSWER

    Re: SOLUTION: DojoTree presenting leaf nodes as expandable nodes

    ‏2013-04-29T19:40:26Z  in response to Ortwin

    Update:

    IBM delivered a test fix that solves the problem.

    The fix is created under PMR 51401 211 788 and is named: FixForRATLC02715026

    I assume it will be packaged in the next fix pack: RBD 8.5.2

    Ortwin