Hi qooxdooers,

I'm using the qx.util.serializer.toJson to serialize data of a Form object.

I have a problem with the comboBox widget. This is my comboBox widget:

var combo = new qx.ui.form.ComboBox();
combo.add(new qx.ui.form.ListItem(this.tr("Kiev"), null, "Kiev"));
combo.add(new qx.ui.form.ListItem(this.tr("Odessa"), null, "Odessa"));
combo.add(new qx.ui.form.ListItem(this.tr("Donetsk"), null, "Donetsk"));
combo.add(new qx.ui.form.ListItem(this.tr("Lvov"), null, "Lvov"));
combo.add(new qx.ui.form.ListItem(this.tr("Dnepropetrovsk"), null,
"Dnepropetrovsk"));
combo.add(new qx.ui.form.ListItem(this.tr("Kharkov"), null, "Kharkov"));

This is how i add the widget to the Form object:
form.add(combo, this.tr("City"), null, "city");

If i put a custom value with my keyboard everything works fine the json is:
{ "city" : "Kiev" }

Instead if i choose an option from the ComboBox the serializer write the big
Json string below... i guess that the serializer read the label instead if
the model and outputs the entire localizing class ?
How can i resolve this ? I'm doing something wrong ? I'm using Firefox
3.6.13 on Archlinux.

"city":{"__txt":"Lvov","length":4,"__messageId":"Lvov","__args":[],"$$initialized":true,"classname":"qx.locale.LocalizedString","name":"qx.locale.LocalizedString","basename":"LocalizedString","constructor":[Class
qx.locale.LocalizedString],"translate":function () { return
qx.locale.Manager.getInstance().translate(this.__messageId, this.__args);
},"$$isString":true,"toString":function () { return this.__txt;
},"charAt":function charAt() { [native code] },"valueOf":function () {
return this.__txt; },"charCodeAt":function charCodeAt() { [native code]
},"concat":function concat() { [native code] },"indexOf":function indexOf()
{ [native code] },"lastIndexOf":function lastIndexOf() { [native code]
},"match":function match() { [native code] },"replace":function replace() {
[native code] },"search":function search() { [native code]
},"slice":function slice() { [native code] },"split":function split() {
[native code] },"substr":function substr() { [native code]
},"substring":function substring() { [native code] },"toLowerCase":function
toLowerCase() { [native code] },"toUpperCase":function toUpperCase() {
[native code] },"toHashCode":function () { return
qx.core.ObjectRegistry.toHashCode(this); },"toLocaleLowerCase":function
toLocaleLowerCase() { [native code] },"toLocaleUpperCase":function
toLocaleUpperCase() { [native code] },"base":function (args, varags) {
return qx.core.Object.prototype.base.apply(this, arguments);
},"assert":function (condition, msg) { qx.core.Assert.assert(condition,
msg); },"fail":function (msg) { qx.core.Assert.fail(msg);
},"assertTrue":function (value, msg) { qx.core.Assert.assertTrue(value,
msg); },"assertFalse":function (value, msg) {
qx.core.Assert.assertFalse(value, msg); },"assertEquals":function (expected,
found, msg) { qx.core.Assert.assertEquals(expected, found, msg);
},"assertNotEquals":function (expected, found, msg) {
qx.core.Assert.assertNotEquals(expected, found, msg);
},"assertIdentical":function (expected, found, msg) {
qx.core.Assert.assertIdentical(expected, found, msg);
},"assertNotIdentical":function (expected, found, msg) {
qx.core.Assert.assertNotIdentical(expected, found, msg);
},"assertNotUndefined":function (value, msg) {
qx.core.Assert.assertNotUndefined(value, msg); },"assertUndefined":function
(value, msg) { qx.core.Assert.assertUndefined(value, msg);
},"assertNotNull":function (value, msg) {
qx.core.Assert.assertNotNull(value, msg); },"assertNull":function (value,
msg) { qx.core.Assert.assertNull(value, msg); },"assertJsonEquals":function
(expected, found, msg) { qx.core.Assert.assertJsonEquals(expected, found,
msg); },"assertMatch":function (str, re, msg) {
qx.core.Assert.assertMatch(str, re, msg); },"assertArgumentsCount":function
(args, minCount, maxCount, msg) { qx.core.Assert.assertArgumentsCount(args,
minCount, maxCount, msg); },"assertEventFired":function (obj, event,
invokeFunc, listener, msg) { qx.core.Assert.assertEventFired(obj, event,
invokeFunc, listener, msg); },"assertEventNotFired":function (obj, event,
invokeFunc, msg) { qx.core.Assert.assertEventNotFired(obj, event,
invokeFunc, msg); },"assertException":function (callback, exception, re,
msg) { qx.core.Assert.assertException(callback, exception, re, msg);
},"assertInArray":function (value, array, msg) {
qx.core.Assert.assertInArray(value, array, msg);
},"assertArrayEquals":function (expected, found, msg) {
qx.core.Assert.assertArrayEquals(expected, found, msg);
},"assertKeyInMap":function (value, map, msg) {
qx.core.Assert.assertKeyInMap(value, map, msg); },"assertFunction":function
(value, msg) { qx.core.Assert.assertFunction(value, msg);
},"assertString":function (value, msg) { qx.core.Assert.assertString(value,
msg); },"assertBoolean":function (value, msg) {
qx.core.Assert.assertBoolean(value, msg); },"assertNumber":function (value,
msg) { qx.core.Assert.assertNumber(value, msg);
},"assertPositiveNumber":function (value, msg) {
qx.core.Assert.assertPositiveNumber(value, msg); },"assertInteger":function
(value, msg) { qx.core.Assert.assertInteger(value, msg);
},"assertPositiveInteger":function (value, msg) {
qx.core.Assert.assertPositiveInteger(value, msg); },"assertInRange":function
(value, min, max, msg) { qx.core.Assert.assertInRange(value, min, max, msg);
},"assertObject":function (value, msg) { qx.core.Assert.assertObject(value,
msg); },"assertArray":function (value, msg) {
qx.core.Assert.assertArray(value, msg); },"assertMap":function (value, msg)
{ qx.core.Assert.assertMap(value, msg); },"assertRegExp":function (value,
msg) { qx.core.Assert.assertRegExp(value, msg); },"assertType":function
(value, type, msg) { qx.core.Assert.assertType(value, type, msg);
},"assertInstance":function (value, clazz, msg) {
qx.core.Assert.assertInstance(value, clazz, msg);
},"assertInterface":function (value, iface, msg) {
qx.core.Assert.assertInterface(value, iface, msg);
},"assertCssColor":function (expected, value, msg) {
qx.core.Assert.assertCssColor(expected, value, msg);
},"assertElement":function (value, msg) {
qx.core.Assert.assertElement(value, msg); },"assertQxObject":function
(value, msg) { qx.core.Assert.assertQxObject(value, msg);
},"assertQxWidget":function (value, msg) {
qx.core.Assert.assertQxWidget(value, msg); }}
-- 
View this message in context: 
http://qooxdoo.678.n2.nabble.com/Json-and-ComboBox-serializing-problem-tp5917906p5917906.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to