When using Closure ui components, you almost never want to listen for
browser events. You want to listen for the higher-level event
dispatched by the component. In this case, i think that the event
you're looking for is goog.events.EventType.CHANGE.
treeControl.addEventListener(
goog.events.EventType.CHANGE,
function() { ... });
does that give you what you need?
Nick is correct. However if you do want to listen to click events add a listener to the tree element (use goog.events.listen), not the tree items, and when the user clicks anywhere in the tree element the event will propagate up to the tree element. You can then find the tree item element by using the "target" property of the event.
On Apr 14, 2010 7:32 AM, "Nick Santos" <nicks...@google.com> wrote:
On Wed, Apr 14, 2010 at 6:01 AM, Qamal Kosim-Satyaputra
<qama...@gmail.com> wrote:
> Hi,
> Has anyo...
When using Closure ui components, you almost never want to listen for
browser events. You want to listen for the higher-level event
dispatched by the component. In this case, i think that the event
you're looking for is goog.events.EventType.CHANGE.
treeControl.addEventListener(
goog.events.EventType.CHANGE,
function() { ... });
does that give you what you need?
--
To unsubscribe, reply using "remove me" as the subject.