Override onkeypress for UI.Tree
You should also return non-zero rezult to cancel a default action defined in the tree selection controller.
In fact, the tree does not have its own selection and keyboard navigation controller - in 2.0 it simply inherits the one from the AW.UI.List control (that's why it does not work).
If you want to fix it - you should look at /source/lib/ui/_single.js (kb mapping) and /source/lib/ui/_actions.js (selection/navigation implementation) and adjust them for the tree.
On of the problem in the current tree - the parent node index is missing from the view (or item) model, so it should be added (and probably calculated from the view/indices and view/count or vice versa).
I was able to workout the indicies issue for the up and down arrows, but was wondering if there was a method that indicates if an item is being displayed or not. I know I can tell if the parent is expanded and I can create another array that has the parents to the items, but I was hoping for something more straight forward.
This topic is archived.
Back to support forum
Version 2Looking for AW 2.6 ?
The old site is here.