Perform validations on selected data in tree

Hi,

I have a webix form which contains a data tree with check boxes. I first load the data for the entire tree and then check the required nodes that have already been saved on “ready” by calling checkItem and passing node ids.

(1. this fires onItemCheck event every time a check box is checked).

*** (Is there a better way to load the tree data and check required already saved data instead of doing it in 2 steps?)

Now when the form and data has been loaded, I check\un-check few nodes and want to perform some validations at this point (using something like on change event).

(2. Again onItemCheck event will be fired)

How can I differentiate these 2 calls to onItemCheck?

One last query, is it possible to use anugularJS for tree when it is inside a form?

Thanks in advance.

Regards,
Gaurav

you can define state of checkbox as part of the data

{value:"Top Item", checked:true }

How can I differentiate these 2 calls to onItemCheck?

You can’t, but you can block the event’s in the first case by using code like

tree.blockEvent();
/*code for setting state of checkboxes here*/
tree.unblockEvent();

Thanks a lot Maksim