Hello guys!
In current 0.8.2 I'm at last can bind form inputs to custom object
(which didn't work for me in 0.8.1);
My object is simple getter-setter wrapper for few values;
I'm binding it like that:
var manager = new qx.ui.form.RadioButton("Manager");
var client = new qx.ui.form.RadioButton("Client");
var mgr = new qx.ui.form.RadioGroup;
mgr.add(manager, client);
field1.bind("input", this.loginData, "login");
field2.bind("input", this.loginData, "password");
mgr.bind("changeValue", this.loginData, "mode");
However, I have problems with mgr;
when I do nothing - then radio "manager" is selected in generated app,
BUT this.loginData.mode is empty;
OK, then I try to set it like this:
this.loginData.setMode(mgr.getValue()) -- still Empty;
then I tried to make a fake selection for mgr:
mgr.select(mgr.getItems()[0]); -- still no luck;
but
mgr.select(mgr.getItems()[1]); -- works ok;
In the end, I found a way:
mgr.selectNext();
mgr.selectPrevious();
do the trick :)
So, I think this behavior is like Manager "thinks" that currently
selected item is getItems()[0], but manager didn't know it's value.
Seems like that.
Hope this will help you improve Data Binding :)
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel