Hey sub,
Thats more a problem of the textfield than of the binding itself. Textfields
in qooxdoo take strings and no numbers in general. Usually the data binding
can take care of some kind of conversion automatically if the target
supplies the type information. In that case, value (which is the target) is
no property so it can't supply the needed information for conversion. Thats
why you have to add a converter yourself to get that done [1]:
// create a form controller!
var fc = new qx.data.controller.Form(null, form);
fc.addBindingOptions("Id", {converter : function(data) {
// model --> target
return data + "";
}}, {converter : function(data) {
// target --> model
return parseInt(data);
}});
fc.setModel(model);
Regards,
Martin
[1] http://tinyurl.com/38txseq
--
View this message in context:
http://qooxdoo.678.n2.nabble.com/data-binding-integer-vs-string-binding-for-TextFields-tp5247054p5247433.html
Sent from the qooxdoo mailing list archive at Nabble.com.
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel