A tree without roots? Yes, it's possible. In RBD 8.0.1.2, you can create a DojoTree without a root node. Some trees simply don't need roots. For example, if you have a tree containing continents, you really don't need to explain that they are part of the world - it just becomes a level that's unnecessary. A new property named showRoot was added to
the DojoTree widget, simply set the value to true or false.
When you drag and drop a DojoTree onto the visual editor (also known as the Design tab), the default source code template sets the showRoot property to "true".
Tree DojoTree{ layoutData = new GridLayoutData{ row = 2, column = 2 },
text = "World", width = "200", showRoot = true, /* onClick ::= handleCity, */ children = [
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"}
]}
]};
The resulting tree shows the "World" root.
Simply change showRoot property value to false and the World disappears!
A number of additional properties and events are provided in RBD 8.0.1.2 for the Dojo widgets. From the Properties view, you will see id, width, height, visible and disabled are shown for all the widgets. We've added properties for specific widgets too.
DojoComboBox now supports an editable property to indicate if the user can edit text in field. Constaints and validators were added to
DojoCurrencyTextBox,
DojoDateTextBox, and
DojoTimeTextBox (along with the already supported
DojoTextField)...but we'll need to save some stuff for another blog.
(Not to sound too much like an infomercial...) But that's not all! We've increased the number of events that are supported by the EGL Dojo widgets too. The following table shows support for different events for each widget as of RBD 8.0.1.2. Blue checkmarks denote support before 8.0.1.2 and green marks denote the newly supported events in 8.0.1.2.
(Click on the table to see it in a larger view.)
So whether you're tree has roots or not, we hope you are able to take advantage of the new properties and events of the EGL Dojo widgets.
Enjoy,
Theresa