7 Oct 17:02
How to get the currently focused widget?
From: Gaetan de Menten <gdementen <at> gmail.com>
Subject: How to get the currently focused widget?
Newsgroups: gmane.comp.lang.javascript.qooxdoo.devel
Date: 2008-10-07 15:06:14 GMT
Subject: How to get the currently focused widget?
Newsgroups: gmane.comp.lang.javascript.qooxdoo.devel
Date: 2008-10-07 15:06:14 GMT
When saving a form, I need to make sure my local datastore is updated
with the on-screen value of the fields of the form. This happens
automatically when the user saves the form through the "save" button
on the toolbar, since the current field loose focus. But if the
current fields doesn't loose focus (if the user saves through the
Ctrl-S keyboard shortcut), I have to do it manually.
In 0.7, I used to do:
var focusRoot = containerWidget.getFocusRoot();
if (focusRoot) {
var child = focusRoot.getFocusedChild();
if (child) {
child.blur();
child.focus();
}
}
I couldn't find a way to get to the currently focused widget in 0.8.
Anyone knows the way to do it?
PS: I know I could just force an update of *all* widgets value, but
I'd rather avoid it since it's totally unnecessary.
--
--
Gaëtan de Menten
http://openhex.org
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
(Continue reading)
RSS Feed