I was looking to wire up some selection processing once my nodes in a
TreeView are selected. I noticed that there is a listener list for that that
I can add a listener to but I did not see anything easy to use such as a
simple method I can override on the TreeView that is called when the
selection changes. 

 

Is it expected that even subclasses of the actual class have to add a bunch
of boilerplate listeners to the controls to track these types of events? Is
there a default listener installed that translates the listener methods into
simple-to-override calls in the subclass?

 

I saw the tutorial on event listener attributes, but it was not clear how I
could simply, without a lot of specification or script tags, invoke a method
on my TreeView subclass with the arguments of the listener so I could
process the selection change event. What is in the bindings if the inline
script is executed and how to reference "this."? How do I reference the
argument of the listener event e.g. the path that changed in this example?

 

Essentially, I just want my subclass's method onSelectionPathAdded(Path
added) to be called which mostly mirrors the listener. 

Reply via email to