PDA

View Full Version : [CLOSED] TreeNode JS getUI method



softmachine2011
Jul 20, 2012, 7:22 AM
Hi,

In older versions I use this code to find UI properties of a treenode


node.ui.checked
or
node.getUI().checked

And now I'm unable to find these properties. how can I find it for use it?

Daniil
Jul 20, 2012, 10:38 AM
Hi,

A Node is just a record now, there is no encapsulated UI, it is managed by View.

The related changelog item #76.
http://examples2.ext.net/#/Getting_Started/Release_Documents/CHANGELOG/



76. TreeNode has been renamed to Node. Node has no client side getUI method. To get a node's HTML element, use the view's getNode method. Example //New tree.getView().getNode(node)

But in your case you should not use View, I think. There is the "checked" field in the node.

node.get("checked");

Hope this helps.

softmachine2011
Jul 20, 2012, 11:01 AM
Well, I have to use the following properties/functions:



node.ui.rendered (get) => it could be replaced by node.isVisible() ??
node.ui.toggleCheck(someVar); =>
node.ui.checkbox.checked (get) => it could be replaced by node.get('checked')


Could you correct me, and tell me what is the equivalent of toggleCheck?

Daniil
Jul 20, 2012, 1:24 PM
node.ui.rendered (get) => it could be replaced by node.isVisible() ??



I think yes.





node.ui.toggleCheck(someVar); =>



Please use:

node.set('checked', true || false);





node.ui.checkbox.checked (get) => it could be replaced by node.get('checked')



Confirm.