Hi,
I'm trying to figure out how to trigger a 'changeSelection' event. Situation
is that I have a SelectBox(), have added a listener on 'changeSelection'.
When I add the first item to the SelectBox, the listener fires. Adding more
items after that, the listener does NOT fire. After I'm done adding all of
the items in the selectBox, I've saved one of the items to select, depending
on the time of day, and then do a box.setSelection([saved_item]).

Now, if the saved item is the first item, the selection is NOT changed, the
listener does not fire; only fires if the saved item is one of the later
items.

Since the listener firing causes a bunch of stuff including a DB query, I'd
rather only fire the listener once, with the correct item.

I would like to populate the entire list, and then
setSelection([saved_item]), and have the listener invoked only that one
time, with the proper item selected. I tried:

(disable listener)

add several items, keeping one as the final selection...

setSelection([saved_item])
(enable the listener again)
myselectbox.fireEvent('changeSelection');

but my listener did not seem to be called, and the app went off to neverland
as well. What is the proper way to fireEvent() on a 'changeSelection'
listener, OR what's the correct way to achieve what I'm attempting? Can I
pass the saved_item to the fireEvent, or...???
Ken
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to