Hey,
you have a bunch of options to do that. Either you create your own model 
containing the keys of the form and the additional keys using the JSON 
marshaler [1] and use that model instead of the one created by the form 
controller. Another option would be to add the keys right before sending the 
data which means you manipulate the data after serializing it to a JavaScript 
object [2]. After adding your keys, you can serialize it again to JSON using 
the JSON class [3].
Regards,
Martin

[1] http://demo.qooxdoo.org/current/apiviewer/#qx.data.marshal.Json
[2] http://demo.qooxdoo.org/current/apiviewer/#qx.util.Serializer~toNativeObject
[3] http://demo.qooxdoo.org/current/apiviewer/#qx.lang.Json

Am 27.03.2013 um 18:55 schrieb Hans Juergen Gamauf 
<[email protected]<mailto:[email protected]>>:

Hello!

Is it possible, to add some properties to a qooxdoo-model, which you obtain
from a form through

var controller = new qx.data.controller.Form(null, form);
var model = controller.createModel();

?

I want to serialize this model through
qx.util.Serializer.toJson(model)
but with some additional fields, which are not included in the above form

Is that possible?

Thanks,
Hans Juergen





--
View this message in context: 
http://qooxdoo.678.n2.nabble.com/Model-Add-property-tp7583154.html
Sent from the qooxdoo mailing list archive at Nabble.com<http://Nabble.com>.

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
qooxdoo-devel mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to