:: Forum >>

AW.UI.Tree -event "onItemDoubleClicked" is not firing


Issue is that "onItemDoubleClicked" the item is just getting selected, but after the item is selected the "onItemDoubleClicked" is working fine. I tried the same in the demo provided in this site, behaves the same. is there any way I can fire the "onItemDoubleClicked" when I first double click on the item ( now if I double click it first select the item , after selection if I double click its works fine) . Please help

Thanks In Advance
Thimi Jose
Tuesday, March 13, 2007
Yes, this is a bug in the tree (and the list) control. To fix it it is necessary to replace refresh() call to refreshClasses() in onItemStateChanged event handler. You can do it by adding your own event handler and canceling the default one.

tree.onItemStateChanged = function(value, index){
    this.getItemTemplate(index).refreshClasses(); // instead of refresh()
    return true; // cancel default handler

tree.onItemDoubleClicked = function(event, index){
    window.status = index; // should work now
Alex (ActiveWidgets)
Thursday, March 15, 2007
Hi Alex,

Thank you very much for the response. The fix worked.

Thanks and Regards
Thimi Jose
Friday, March 16, 2007

This topic is archived.

Back to support forum

Forum search