Hi Martin,
yes we have the list controller already working. But we do not only want an
unidirectional binding. If we do that and have to specify all the
unidirectional bindings and model set operations on save manually, then the
databinding is of not much worth then.
It would be very helpful to have operations like the ones in the eclipse
jface databinding. There you have the possibility to sync from source to
target and from target to source with a method call. And during the binding
setup you can specify for each direction if it should happen automatically
or on user behalf. To make it more clear below is an example in pseudocode:
var model = { attr1: "value", attr2: "something" }
var f1 = new Textfield()
var f2 = new Textfield()
bind(model, "attr1", {sync: "automatic"}, f1, "value", {sync: "manual"})
bind(model, "attr2", {sync: "automatic"}, f2, "value", {sync: "manual"})
...
Then every value changes on the model will be shown immediatly in the view
fields, but changes from the view will not automatically propagated to the
model.
Finally on save button click you can call a method like this
"controller.syncToModel()" and everything from the view is pushed into the
model. No setter, no getter call required on the user side.
As far as I read the docs this is currently not possible with qooxdoo, isn't
it?
Regards
Markus Wolf
2010/9/29 Martin Wittemann <martin.wittem...@1und1.de>
> Hey,
>
> that question is really interesting. So interesting I started up the
> playground at home. ;)
> So the fact is, that the form controller always sets up the binding in both
> ways. But luckily, the form controller is not that much more than the object
> controller in your case. The good thing is, with the object controller, you
> can set up the binding uni-directional. I made up a little example to show
> you how you can get it done but I omitted the list controller. Thats the
> part you already have, right?
>
> http://tinyurl.com/3yrqb7m
>
> I hope that helps,
> Martin
>
> Am 29.09.2010 um 18:37 schrieb Markus Wolf:
>
> Hi there,
>
> I have a question about the databinding.
> We have the following UseCase in our application:
> 1) We display a list of json/model objects in a qx.ui.list.List widget
> 2) If the user selects one and pushes an edit button a new window is opened
> 3) In this window the selected model item from the list is displayed in a
> form
>
> So far everything works well.
>
> If the data is edited in the form, then this is propagated directly to the
> model (as expected) but we would like the data to be transfered back on a
> user specified event (a save button in our case).
>
> How could we setup this using databinding? I could not find any
> documentation on 'half-bidirectional' databinding.
>
> Regards
> Markus Wolf
> --
> Markus Wolf, Developer
> markus.w...@sinnerschrader.com
>
> T +49.40.39 88 55 - 324
>
> SinnerSchrader Deutschland GmbH
> Völckersstraße 38, D-22765 Hamburg
> Amtsgericht Hamburg HRB-Nr. 63663
> Geschäftsführer: Matthias Schrader (Sprecher), Holger Blank,
> Laurent Burdin, Thomas Dyckhoff, Chris Wallon
> Büros: Hamburg, Frankfurt am Main
>
> http://www.sinnerschrader.de | Creating Radical Relationships.
> <ATT00001..txt><ATT00002..txt>
>
>
>
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> qooxdoo-devel mailing list
> qooxdoo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
--
Markus Wolf, Developer
markus.w...@sinnerschrader.com
T +49.40.39 88 55 - 324
SinnerSchrader Deutschland GmbH
Völckersstraße 38, D-22765 Hamburg
Amtsgericht Hamburg HRB-Nr. 63663
Geschäftsführer: Matthias Schrader (Sprecher), Holger Blank,
Laurent Burdin, Thomas Dyckhoff, Chris Wallon
Büros: Hamburg, Frankfurt am Main
http://www.sinnerschrader.de | Creating Radical Relationships.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel