Bidirectional Data Binding for custom widget with CheckBox and TextField

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

Bidirectional Data Binding for custom widget with CheckBox and TextField

larseitzen
Hi,

I am implementing a small mock-up application having two lists (qx.ui.form.List) synchronized
with an data array (qx.data.Array) via controller (qx.data.controller.List). I have implemented a
class representing a custom widget, which holds a qx.ui.form.CheckBox and a qx.ui.form.TextField.
The class outline of the custom widget is analogous to the example in the qooxdoo tutorial found
in the qooxdoo manual 3.0, chapter 4.7. The special thing about my application is that both lists
should be bound bidirectionally, so when I change a checkbox or the content of a textfield in list 1,
this will change the corresponding value in data model (containing the two properties "value" and
"text", equipped with events) and also the corresponding checkbox or textfield in list 2.
I have tested my application using a simple qx.ui.form.CheckBox and binding to the properties "value" and
"label", which works just fine. For the bidirectional binding I have used the methods bindProperty and
bindPropertyReverse inside the delegate of both controllers (I use one controller for binding the model
to list 1 and another controller for binding the model to list 2).
I have also tested my application using the unidirectional binding only (bindProperty method of controllers),
which also works, although the checkboxes are not editable and there is an error message on the console
saying:

"Uncaught TypeError: Object [object Object] has no method 'getLabel'..."

This seems partly logical to me, since I only have defined unidirectional binding.

However, using the method bindPropertyReverse in my bindItem function of my delegate results in the following
error on my browser console (listsync.ListItem is my custom widget):

"Uncaught Binding property value of object listsync.ListItem[73-0] not possible: No event available. : error..."

It would be great, if someone could help me in this matter. Really looking forward to your responses.

best,
L.

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Bidirectional Data Binding for custom widget with CheckBox and TextField

Romeo Kenfack Tsakem

Hi Lars,

 

can you please provide me a playground example ?

It will make it easier to understand and debug your code.

 

Regards,

Romeo

 

Von: [hidden email] [mailto:[hidden email]]
Gesendet: Mittwoch, 21. August 2013 10:53
An: [hidden email]
Betreff: [qooxdoo-devel] Bidirectional Data Binding for custom widget with CheckBox and TextField

 

Hi,


I am implementing a small mock-up application having two lists (qx.ui.form.List) synchronized
with an data array (qx.data.Array) via controller (qx.data.controller.List). I have implemented a
class representing a custom widget, which holds a qx.ui.form.CheckBox and a qx.ui.form.TextField.
The class outline of the custom widget is analogous to the example in the qooxdoo tutorial found
in the qooxdoo manual 3.0, chapter 4.7. The special thing about my application is that both lists
should be bound bidirectionally, so when I change a checkbox or the content of a textfield in list 1,
this will change the corresponding value in data model (containing the two properties "value" and
"text", equipped with events) and also the corresponding checkbox or textfield in list 2.
I have tested my application using a simple qx.ui.form.CheckBox and binding to the properties "value" and
"label", which works just fine. For the bidirectional binding I have used the methods bindProperty and
bindPropertyReverse inside the delegate of both controllers (I use one controller for binding the model
to list 1 and another controller for binding the model to list 2).
I have also tested my application using the unidirectional binding only (bindProperty method of controllers),
which also works, although the checkboxes are not editable and there is an error message on the console
saying:

"Uncaught TypeError: Object [object Object] has no method 'getLabel'..."

This seems partly logical to me, since I only have defined unidirectional binding.

However, using the method bindPropertyReverse in my bindItem function of my delegate results in the following
error on my browser console (listsync.ListItem is my custom widget):

"Uncaught Binding property value of object listsync.ListItem[73-0] not possible: No event available. : error..."

It would be great, if someone could help me in this matter. Really looking forward to your responses.

best,
L.


------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Bidirectional Data Binding for custom widget with CheckBox and TextField

larseitzen
Hi Romeo,

thanks for the quick response! How do I create a Playground Example?


Best,
Lars


-----Ursprüngliche Mitteilung-----
Von: Romeo Kenfack Tsakem <[hidden email]>
An: qooxdoo Development <[hidden email]>
Verschickt: Mi, 21 Aug 2013 11:21 am
Betreff: Re: [qooxdoo-devel] Bidirectional Data Binding for custom widget with CheckBox and TextField

Hi Lars,
 
can you please provide me a playground example ?
It will make it easier to understand and debug your code.
 
Regards,
Romeo
 
Von: [hidden email] [[hidden email]]
Gesendet: Mittwoch, 21. August 2013 10:53
An: [hidden email]
Betreff: [qooxdoo-devel] Bidirectional Data Binding for custom widget with CheckBox and TextField
 
Hi,

I am implementing a small mock-up application having two lists (qx.ui.form.List) synchronized
with an data array (qx.data.Array) via controller (qx.data.controller.List). I have implemented a
class representing a custom widget, which holds a qx.ui.form.CheckBox and a qx.ui.form.TextField.
The class outline of the custom widget is analogous to the example in the qooxdoo tutorial found
in the qooxdoo manual 3.0, chapter 4.7. The special thing about my application is that both lists
should be bound bidirectionally, so when I change a checkbox or the content of a textfield in list 1,
this will change the corresponding value in data model (containing the two properties "value" and
"text", equipped with events) and also the corresponding checkbox or textfield in list 2.
I have tested my application using a simple qx.ui.form.CheckBox and binding to the properties "value" and
"label", which works just fine. For the bidirectional binding I have used the methods bindProperty and
bindPropertyReverse inside the delegate of both controllers (I use one controller for binding the model
to list 1 and another controller for binding the model to list 2).
I have also tested my application using the unidirectional binding only (bindProperty method of controllers),
which also works, although the checkboxes are not editable and there is an error message on the console
saying:

"Uncaught TypeError: Object [object Object] has no method 'getLabel'..."

This seems partly logical to me, since I only have defined unidirectional binding.

However, using the method bindPropertyReverse in my bindItem function of my delegate results in the following
error on my browser console (listsync.ListItem is my custom widget):

"Uncaught Binding property value of object listsync.ListItem[73-0] not possible: No event available. : error..."

It would be great, if someone could help me in this matter. Really looking forward to your responses.
best,
L.
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Bidirectional Data Binding for custom widget with CheckBox and TextField

Romeo Kenfack Tsakem

Hi Lars,

 

Go to http://playground.qooxdoo.org and just paste your code there.

Save the code and send me the url.

 

Regards,

Romeo

 

Von: [hidden email] [mailto:[hidden email]]
Gesendet: Mittwoch, 21. August 2013 11:37
An: [hidden email]
Betreff: Re: [qooxdoo-devel] Bidirectional Data Binding for custom widget with CheckBox and TextField

 

Hi Romeo,

thanks for the quick response! How do I create a Playground Example?


Best,
Lars

 

-----Ursprüngliche Mitteilung-----
Von: Romeo Kenfack Tsakem <[hidden email]>
An: qooxdoo Development <[hidden email]>
Verschickt: Mi, 21 Aug 2013 11:21 am
Betreff: Re: [qooxdoo-devel] Bidirectional Data Binding for custom widget with CheckBox and TextField

Hi Lars,

 

can you please provide me a playground example ?

It will make it easier to understand and debug your code.

 

Regards,

Romeo

 

Von: [hidden email] [[hidden email]]
Gesendet: Mittwoch, 21. August 2013 10:53
An: [hidden email]
Betreff: [qooxdoo-devel] Bidirectional Data Binding for custom widget with CheckBox and TextField

 

Hi,


I am implementing a small mock-up application having two lists (qx.ui.form.List) synchronized
with an data array (qx.data.Array) via controller (qx.data.controller.List). I have implemented a
class representing a custom widget, which holds a qx.ui.form.CheckBox and a qx.ui.form.TextField.
The class outline of the custom widget is analogous to the example in the qooxdoo tutorial found
in the qooxdoo manual 3.0, chapter 4.7. The special thing about my application is that both lists
should be bound bidirectionally, so when I change a checkbox or the content of a textfield in list 1,
this will change the corresponding value in data model (containing the two properties "value" and
"text", equipped with events) and also the corresponding checkbox or textfield in list 2.
I have tested my application using a simple qx.ui.form.CheckBox and binding to the properties "value" and
"label", which works just fine. For the bidirectional binding I have used the methods bindProperty and
bindPropertyReverse inside the delegate of both controllers (I use one controller for binding the model
to list 1 and another controller for binding the model to list 2).
I have also tested my application using the unidirectional binding only (bindProperty method of controllers),
which also works, although the checkboxes are not editable and there is an error message on the console
saying:

"Uncaught TypeError: Object [object Object] has no method 'getLabel'..."

This seems partly logical to me, since I only have defined unidirectional binding.

However, using the method bindPropertyReverse in my bindItem function of my delegate results in the following
error on my browser console (listsync.ListItem is my custom widget):

"Uncaught Binding property value of object listsync.ListItem[73-0] not possible: No event available. : error..."

It would be great, if someone could help me in this matter. Really looking forward to your responses.

best,
L.

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Bidirectional Data Binding for custom widget with CheckBox and TextField

larseitzen
Hi Romeo,

I have saved both files (Application.js and ListItem.js) as separate Items. The code lines for my custom widget are commented out and the code should work
as it is (bidirectional version using a simple CheckBox) . The link is the following:

http://demo.qooxdoo.org/3.0/playground/#%7B%22code%22%3A%22%252F**%250A%2520*%2520This%2520is%2520the%2520main%2520application%2520class%2520of%2520your%2520custom%2520application%2520%2522listSync%2522%250A%2520*%250A%2520*%2520%2540asset%28listsync%252F*%29%250A%2520*%252F%250Aqx.Class.define%28%2522listsync.Application%2522%252C%250A%257B%250A%2520%2520extend%2520%253A%2520qx.application.Standalone%252C%250A%250A%2520%2520%252F*%250A%2520%2520*****************************************************************************%250A%2520%2520%2520%2520%2520MEMBERS%250A%2520%2520*****************************************************************************%250A%2520%2520*%252F%250A%250A%2520%2520members%2520%253A%250A%2520%2520%257B%250A%2520%2520%2520%2520%252F**%250A%2520%2520%2520%2520%2520*%2520This%2520method%2520contains%2520the%2520initial%2520application%2520code%2520and%2520gets%2520called%2520%250A%2520%2520%2520%2520%2520*%2520during%2520startup%2520of%2520the%2520application%250A%2520%2520%2520%2520%2520*%2520%250A%2520%2520%2520%2520%2520*%2520%2540lint%2520ignoreDeprecated%28alert%29%250A%2520%2520%2520%2520%2520*%252F%250A%2520%2520%2520%2520main%2520%253A%2520function%28%29%250A%2520%2520%2520%2520%257B%250A%2520%2520%2509%252F%252F%2520Call%2520super%2520class%250A%2509%2509this.base%28arguments%29%253B%250A%250A%2509%2509%252F%252F%2520Enable%2520logging%2520in%2520debug%2520variant%250A%2509%2509if%2520%28qx.core.Environment.get%28%2522qx.debug%2522%29%29%250A%2509%2509%257B%250A%2509%2509%252F%252F%2520support%2520native%2520logging%2520capabilities%252C%2520e.g.%2520Firebug%2520for%2520Firefox%250A%2509%2509qx.log.appender.Native%253B%250A%2509%2509%252F%252F%2520support%2520additional%2520cross-browser%2520console.%2520Press%2520F7%2520to%2520toggle%2520visibility%250A%2509%2509qx.log.appender.Console%253B%250A%2509%2509%257D%250A%250A%2509%2509%252F*%250A%2509%2509-------------------------------------------------------------------------%250A%2509%2509Below%2520is%2520your%2520actual%2520application%2520code...%250A%2509%2509-------------------------------------------------------------------------%250A%2509%2509*%252F%2509%2509%250A%250A%2509%2509var%2520list1%2520%253D%2520new%2520qx.ui.form.List%28%29%253B%250A%2509%2509var%2520list2%2520%253D%2520new%2520qx.ui.form.List%28%29%253B%2520%2520%2509%250A%250A%2509%2509this.__listModel%2520%253D%2520new%2520qx.data.Array%28%29%253B%250A%2509%2509for%2520%28var%2520i%2520%253D%25200%253B%2520i%2520%253C%25207%253B%2520i%252B%252B%29%250A%2509%2509%257B%250A%2509%2509%2509var%2520value%2520%253D%2520%28i%2520%2525%25202%29%2520%253E%25200%253B%250A%2509%2509%2509this.__listModel.push%28new%2520listsync.ListItemModel%28value%252C%2520%2522Item%2520%2522%2520%252B%2520i%29%29%253B%250A%2509%2509%257D%250A%2509%2509%250A%2509%2509%252F%252F%2520bind%2520list1%2520one%2520to%2520model%250A%2509%2509var%2520controller1%2520%253D%2520new%2520qx.data.controller.List%28null%252C%2520list1%29%253B%250A%2509%2509controller1.setDelegate%28%257B%250A%2520%2520%2520%2520%2520%2520%2520%2520%250A%2509%2509%2509%252F%252F%2520create%2520item%2520for%2520list%2520%28create%2520%2522list%2522%2520item%29%250A%2509%2509%2509createItem%2520%253A%2520function%28%29%2520%257B%250A%2509%2509%2509%2509%252F%252F%2520comment%2520out%2520second%2520line%2520and%2520remove%2520comment%2520from%2520first%2520line%250A%2509%2509%2509%2509%250A%2509%2509%2509%2509%252F%252F%2520return%2520new%2520listsync.ListItem%28%29%253B%2520%250A%2509%2509%2509%2509return%2520new%2520qx.ui.form.CheckBox%28%29%253B%250A%2509%2509%2509%257D%252C%250A%2509%2509%2509%250A%2509%2509%2509bindItem%2520%253A%2520function%28controller%252C%2520item%252C%2520id%29%2520%257B%250A%2509%2509%2509%2509%252F%252F%2520comment%2520out%2520last%2520four%2520lines%2520and%2520remove%2520comment%2520from%2520first%2520four%2520lines%250A%2509%2509%2509%2509%250A%2509%2509%2509%2509%252F%252F%2520controller.bindProperty%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindProperty%28%2522text%2522%252C%2520%2522text%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindPropertyReverse%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindPropertyReverse%28%2522text%2522%252C%2520%2522text%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindProperty%28%2522text%2522%252C%2520%2522label%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindProperty%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindPropertyReverse%28%2522text%2522%252C%2520%2522label%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindPropertyReverse%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%257D%2509%250A%2509%2509%257D%29%253B%2509%2520%2520%2509%2520%2520%250A%2509%2509%252F%252F%2520bind%2520model%2520of%2520controller%2520to%2520data%2520model%250A%2509%2509controller1.setModel%28this.__listModel%29%253B%250A%2509%2509%250A%2509%2509%252F%252F%2520bind%2520list2%2520one%2520to%2520model%250A%2509%2509var%2520controller2%2520%253D%2520new%2520qx.data.controller.List%28null%252C%2520list2%29%253B%250A%2509%2509controller2.setDelegate%28%257B%250A%2520%2520%2520%2520%2520%2520%2520%2520%250A%2509%2509%2509%252F%252F%2520create%2520item%2520for%2520list%2520%28create%2520%2522list%2522%2520item%29%250A%2509%2509%2509createItem%2520%253A%2520function%28%29%2520%257B%250A%2509%2509%2509%2509%252F%252F%2520return%2520new%2520listsync.ListItem%28%29%253B%250A%2509%2509%2509%2509return%2520new%2520qx.ui.form.CheckBox%28%29%253B%250A%2509%2509%2509%257D%252C%250A%2509%2509%2509%250A%2509%2509%2509bindItem%2520%253A%2520function%28controller%252C%2520item%252C%2520id%29%2520%257B%250A%2509%2509%2509%2509%252F%252F%2520comment%2520out%2520last%2520four%2520lines%2520and%2520remove%2520comment%2520from%2520first%2520four%2520lines%250A%2509%2509%2509%2509%250A%2509%2509%2509%2509%252F%252F%2520controller.bindProperty%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindProperty%28%2522text%2522%252C%2520%2522text%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindPropertyReverse%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindPropertyReverse%28%2522text%2522%252C%2520%2522text%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindProperty%28%2522text%2522%252C%2520%2522label%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindProperty%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindPropertyReverse%28%2522text%2522%252C%2520%2522label%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindPropertyReverse%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%257D%2509%250A%2509%2509%257D%29%253B%2509%2520%2520%2509%2520%2520%250A%2509%2509%252F%252F%2520bind%2520model%2520of%2520controller%2520to%2520data%2520model%250A%2509%2509controller2.setModel%28this.__listModel%29%253B%250A%2509%2509%2509%2509%250A%2509%2509list1.setMinWidth%28150%29%253B%250A%2509%2509list2.setMinWidth%28150%29%253B%250A%2509%2509this.getRoot%28%29.add%28list1%252C%2520%257Bleft%2520%253A%2520100%252C%2520top%2520%253A%2520100%257D%29%253B%250A%2509%2509this.getRoot%28%29.add%28list2%252C%2520%257Bleft%2520%253A%2520300%252C%2520top%2520%253A%2520100%257D%29%253B%2520%250A%2509%2509%250A%2509%2509%252F%252F%2520add%2520description%2520for%2520the%2520to%2520lists%250A%2509%2509var%2520listLabel1%2520%253D%2520new%2520qx.ui.basic.Label%28%2522List%25201%253A%2522%29%253B%250A%2509%2509var%2520listLabel2%2520%253D%2520new%2520qx.ui.basic.Label%28%2522List%25202%253A%2522%29%253B%250A%2509%2509%250A%2509%2509%252F%252F%2520add%2520toggle%2520button%250A%2509%2509var%2520toggleButton%2520%253D%2520new%2520qx.ui.form.Button%28%2522Toogle%2522%29%250A%2509%2509toggleButton.setWidth%28350%29%253B%250A%2509%2509this.getRoot%28%29.add%28toggleButton%252C%2520%257Bleft%2520%253A%2520100%252C%2520top%2520%253A%2520320%257D%29%253B%250A%2509%2509toggleButton.addListener%28%2522execute%2522%252C%2520function%28%29%250A%2509%2509%257B%250A%2509%2509%2509var%2520listModel%2520%253D%2520this.__listModel.toArray%28%29%253B%250A%2509%2509%2509for%2520%28i%2520%253D%25200%253B%2520i%2520%253C%2520listModel.length%253B%2520i%252B%252B%29%250A%2509%2509%2509%257B%250A%2509%2509%2509%2509listModel%255Bi%255D.setValue%28!listModel%255Bi%255D.getValue%28%29%29%253B%250A%2509%2509%2509%257D%250A%2509%2509%257D%252C%2520this%29%253B%250A%2509%2509%250A%2509%2509this.getRoot%28%29.add%28listLabel1%252C%2520%257Bleft%2520%253A%2520100%252C%2520top%2520%253A%252080%257D%29%253B%250A%2509%2509this.getRoot%28%29.add%28listLabel2%252C%2520%257Bleft%2520%253A%2520300%252C%2520top%2520%253A%252080%257D%29%253B%250A%2520%2520%2520%2520%257D%250A%2520%2520%257D%250A%257D%29%253B%22%2C%20%22mode%22%3A%22ria%22%7D




-----Ursprüngliche Mitteilung-----
Von: Romeo Kenfack Tsakem <[hidden email]>
An: qooxdoo Development <[hidden email]>
Verschickt: Mi, 21 Aug 2013 11:53 am
Betreff: Re: [qooxdoo-devel] Bidirectional Data Binding for custom widget with CheckBox and TextField

Hi Lars,
 
Go to http://playground.qooxdoo.org and just paste your code there.
Save the code and send me the url.
 
Regards,
Romeo
 
Von: [hidden email] [[hidden email]]
Gesendet: Mittwoch, 21. August 2013 11:37
An: [hidden email]
Betreff: Re: [qooxdoo-devel] Bidirectional Data Binding for custom widget with CheckBox and TextField
 
Hi Romeo,

thanks for the quick response! How do I create a Playground Example?


Best,
Lars
 
-----Ursprüngliche Mitteilung-----
Von: Romeo Kenfack Tsakem <[hidden email]>
An: qooxdoo Development <[hidden email]>
Verschickt: Mi, 21 Aug 2013 11:21 am
Betreff: Re: [qooxdoo-devel] Bidirectional Data Binding for custom widget with CheckBox and TextField
Hi Lars,
 
can you please provide me a playground example ?
It will make it easier to understand and debug your code.
 
Regards,
Romeo
 
Von: [hidden email] [[hidden email]]
Gesendet: Mittwoch, 21. August 2013 10:53
An: [hidden email]
Betreff: [qooxdoo-devel] Bidirectional Data Binding for custom widget with CheckBox and TextField
 
Hi,

I am implementing a small mock-up application having two lists (qx.ui.form.List) synchronized
with an data array (qx.data.Array) via controller (qx.data.controller.List). I have implemented a
class representing a custom widget, which holds a qx.ui.form.CheckBox and a qx.ui.form.TextField.
The class outline of the custom widget is analogous to the example in the qooxdoo tutorial found
in the qooxdoo manual 3.0, chapter 4.7. The special thing about my application is that both lists
should be bound bidirectionally, so when I change a checkbox or the content of a textfield in list 1,
this will change the corresponding value in data model (containing the two properties "value" and
"text", equipped with events) and also the corresponding checkbox or textfield in list 2.
I have tested my application using a simple qx.ui.form.CheckBox and binding to the properties "value" and
"label", which works just fine. For the bidirectional binding I have used the methods bindProperty and
bindPropertyReverse inside the delegate of both controllers (I use one controller for binding the model
to list 1 and another controller for binding the model to list 2).
I have also tested my application using the unidirectional binding only (bindProperty method of controllers),
which also works, although the checkboxes are not editable and there is an error message on the console
saying:

"Uncaught TypeError: Object [object Object] has no method 'getLabel'..."

This seems partly logical to me, since I only have defined unidirectional binding.

However, using the method bindPropertyReverse in my bindItem function of my delegate results in the following
error on my browser console (listsync.ListItem is my custom widget):

"Uncaught Binding property value of object listsync.ListItem[73-0] not possible: No event available. : error..."

It would be great, if someone could help me in this matter. Really looking forward to your responses.
best,
L.
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Bidirectional Data Binding for custom widget with CheckBox and TextField

Thomas Herchenroeder
You can use the Playground's "Shorten URL" button for such use cases.

T.

On 08/21/2013 12:04 PM, [hidden email] wrote:
Hi Romeo,

I have saved both files (Application.js and ListItem.js) as separate Items. The code lines for my custom widget are commented out and the code should work
as it is (bidirectional version using a simple CheckBox) . The link is the following:

<a class="moz-txt-link-freetext" href="http://demo.qooxdoo.org/3.0/playground/#%7B%22code%22%3A%22%252F**%250A%2520*%2520This%2520is%2520the%2520main%2520application%2520class%2520of%2520your%2520custom%2520application%2520%2522listSync%2522%250A%2520*%250A%2520*%2520%2540asset%28listsync%252F*%29%250A%2520*%252F%250Aqx.Class.define%28%2522listsync.Application%2522%252C%250A%257B%250A%2520%2520extend%2520%253A%2520qx.application.Standalone%252C%250A%250A%2520%2520%252F*%250A%2520%2520*****************************************************************************%250A%2520%2520%2520%2520%2520MEMBERS%250A%2520%2520*****************************************************************************%250A%2520%2520*%252F%250A%250A%2520%2520members%2520%253A%250A%2520%2520%257B%250A%2520%2520%2520%2520%252F**%250A%2520%2520%2520%2520%2520*%2520This%2520method%2520contains%2520the%2520initial%2520application%2520code%2520and%2520gets%2520called%2520%250A%2520%2520%2520%2520%2520*%2520during%2520start up%2520of%2520the%2520application%250A%2520%2520%2520%2520%2520*%2520%250A%2520%2520%2520%2520%2520*%2520%2540lint%2520ignoreDeprecated%28alert%29%250A%2520%2520%2520%2520%2520*%252F%250A%2520%2520%2520%2520main%2520%253A%2520function%28%29%250A%2520%2520%2520%2520%257B%250A%2520%2520%2509%252F%252F%2520Call%2520super%2520class%250A%2509%2509this.base%28arguments%29%253B%250A%250A%2509%2509%252F%252F%2520Enable%2520logging%2520in%2520debug%2520variant%250A%2509%2509if%2520%28qx.core.Environment.get%28%2522qx.debug%2522%29%29%250A%2509%2509%257B%250A%2509%2509%252F%252F%2520support%2520native%2520logging%2520capabilities%252C%2520e.g.%2520Firebug%2520for%2520Firefox%250A%2509%2509qx.log.appender.Native%253B%250A%2509%2509%252F%252F%2520support%2520additional%2520cross-browser%2520console.%2520Press%2520F7%2520to%2520toggle%2520visibility%250A%2509%2509qx.log.appender.Console%253B%250A%2509%2509%257D%250A%250A%2509%2509%252F*%250A%2509%2509----------------------------------------------- --------------------------%250A%2509%2509Below%2520is%2520your%2520actual%2520application%2520code...%250A%2509%2509-------------------------------------------------------------------------%250A%2509%2509*%252F%2509%2509%250A%250A%2509%2509var%2520list1%2520%253D%2520new%2520qx.ui.form.List%28%29%253B%250A%2509%2509var%2520list2%2520%253D%2520new%2520qx.ui.form.List%28%29%253B%2520%2520%2509%250A%250A%2509%2509this.__listModel%2520%253D%2520new%2520qx.data.Array%28%29%253B%250A%2509%2509for%2520%28var%2520i%2520%253D%25200%253B%2520i%2520%253C%25207%253B%2520i%252B%252B%29%250A%2509%2509%257B%250A%2509%2509%2509var%2520value%2520%253D%2520%28i%2520%2525%25202%29%2520%253E%25200%253B%250A%2509%2509%2509this.__listModel.push%28new%2520listsync.ListItemModel%28value%252C%2520%2522Item%2520%2522%2520%252B%2520i%29%29%253B%250A%2509%2509%257D%250A%2509%2509%250A%2509%2509%252F%252F%2520bind%2520list1%2520one%2520to%2520model%250A%2509%2509var%2520controller1%2520%253D%2520new%2520qx.data.c ontroller.List%28null%252C%2520list1%29%253B%250A%2509%2509controller1.setDelegate%28%257B%250A%2520%2520%2520%2520%2520%2520%2520%2520%250A%2509%2509%2509%252F%252F%2520create%2520item%2520for%2520list%2520%28create%2520%2522list%2522%2520item%29%250A%2509%2509%2509createItem%2520%253A%2520function%28%29%2520%257B%250A%2509%2509%2509%2509%252F%252F%2520comment%2520out%2520second%2520line%2520and%2520remove%2520comment%2520from%2520first%2520line%250A%2509%2509%2509%2509%250A%2509%2509%2509%2509%252F%252F%2520return%2520new%2520listsync.ListItem%28%29%253B%2520%250A%2509%2509%2509%2509return%2520new%2520qx.ui.form.CheckBox%28%29%253B%250A%2509%2509%2509%257D%252C%250A%2509%2509%2509%250A%2509%2509%2509bindItem%2520%253A%2520function%28controller%252C%2520item%252C%2520id%29%2520%257B%250A%2509%2509%2509%2509%252F%252F%2520comment%2520out%2520last%2520four%2520lines%2520and%2520remove%2520comment%2520from%2520first%2520four%2520lines%250A%2509%2509%2509%2509%250A%2509%2509%2509%2509%25 2F%252F%2520controller.bindProperty%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindProperty%28%2522text%2522%252C%2520%2522text%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindPropertyReverse%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindPropertyReverse%28%2522text%2522%252C%2520%2522text%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindProperty%28%2522text%2522%252C%2520%2522label%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindProperty%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindPropertyReverse%28%2522text%2522%252C%2520%2522label%2522%252C%2520null%252C%2520ite m%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindPropertyReverse%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%257D%2509%250A%2509%2509%257D%29%253B%2509%2520%2520%2509%2520%2520%250A%2509%2509%252F%252F%2520bind%2520model%2520of%2520controller%2520to%2520data%2520model%250A%2509%2509controller1.setModel%28this.__listModel%29%253B%250A%2509%2509%250A%2509%2509%252F%252F%2520bind%2520list2%2520one%2520to%2520model%250A%2509%2509var%2520controller2%2520%253D%2520new%2520qx.data.controller.List%28null%252C%2520list2%29%253B%250A%2509%2509controller2.setDelegate%28%257B%250A%2520%2520%2520%2520%2520%2520%2520%2520%250A%2509%2509%2509%252F%252F%2520create%2520item%2520for%2520list%2520%28create%2520%2522list%2522%2520item%29%250A%2509%2509%2509createItem%2520%253A%2520function%28%29%2520%257B%250A%2509%2509%2509%2509%252F%252F%2520return%2520new%2520listsync.ListItem%28%29%253B%250A%2509%2509%2509%2509return%2520n ew%2520qx.ui.form.CheckBox%28%29%253B%250A%2509%2509%2509%257D%252C%250A%2509%2509%2509%250A%2509%2509%2509bindItem%2520%253A%2520function%28controller%252C%2520item%252C%2520id%29%2520%257B%250A%2509%2509%2509%2509%252F%252F%2520comment%2520out%2520last%2520four%2520lines%2520and%2520remove%2520comment%2520from%2520first%2520four%2520lines%250A%2509%2509%2509%2509%250A%2509%2509%2509%2509%252F%252F%2520controller.bindProperty%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindProperty%28%2522text%2522%252C%2520%2522text%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindPropertyReverse%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindPropertyReverse%28%2522text%2522%252C%2520%2522text%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A% 2509%2509%2509%2509controller.bindProperty%28%2522text%2522%252C%2520%2522label%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindProperty%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindPropertyReverse%28%2522text%2522%252C%2520%2522label%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindPropertyReverse%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%257D%2509%250A%2509%2509%257D%29%253B%2509%2520%2520%2509%2520%2520%250A%2509%2509%252F%252F%2520bind%2520model%2520of%2520controller%2520to%2520data%2520model%250A%2509%2509controller2.setModel%28this.__listModel%29%253B%250A%2509%2509%2509%2509%250A%2509%2509list1.setMinWidth%28150%29%253B%250A%2509%2509list2.setMinWidth%28150%29%253B%250A%2509%2509this.getRoot%28%29.add%28list1%252C%2520%257Bleft%2520%253A%252 0100%252C%2520top%2520%253A%2520100%257D%29%253B%250A%2509%2509this.getRoot%28%29.add%28list2%252C%2520%257Bleft%2520%253A%2520300%252C%2520top%2520%253A%2520100%257D%29%253B%2520%250A%2509%2509%250A%2509%2509%252F%252F%2520add%2520description%2520for%2520the%2520to%2520lists%250A%2509%2509var%2520listLabel1%2520%253D%2520new%2520qx.ui.basic.Label%28%2522List%25201%253A%2522%29%253B%250A%2509%2509var%2520listLabel2%2520%253D%2520new%2520qx.ui.basic.Label%28%2522List%25202%253A%2522%29%253B%250A%2509%2509%250A%2509%2509%252F%252F%2520add%2520toggle%2520button%250A%2509%2509var%2520toggleButton%2520%253D%2520new%2520qx.ui.form.Button%28%2522Toogle%2522%29%250A%2509%2509toggleButton.setWidth%28350%29%253B%250A%2509%2509this.getRoot%28%29.add%28toggleButton%252C%2520%257Bleft%2520%253A%2520100%252C%2520top%2520%253A%2520320%257D%29%253B%250A%2509%2509toggleButton.addListener%28%2522execute%2522%252C%2520function%28%29%250A%2509%2509%257B%250A%2509%2509%2509var%2520listModel%2520%253D%2520 this.__listModel.toArray%28%29%253B%250A%2509%2509%2509for%2520%28i%2520%253D%25200%253B%2520i%2520%253C%2520listModel.length%253B%2520i%252B%252B%29%250A%2509%2509%2509%257B%250A%2509%2509%2509%2509listModel%255Bi%255D.setValue%28!listModel%255Bi%255D.getValue%28%29%29%253B%250A%2509%2509%2509%257D%250A%2509%2509%257D%252C%2520this%29%253B%250A%2509%2509%250A%2509%2509this.getRoot%28%29.add%28listLabel1%252C%2520%257Bleft%2520%253A%2520100%252C%2520top%2520%253A%252080%257D%29%253B%250A%2509%2509this.getRoot%28%29.add%28listLabel2%252C%2520%257Bleft%2520%253A%2520300%252C%2520top%2520%253A%252080%257D%29%253B%250A%2520%2520%2520%2520%257D%250A%2520%2520%257D%250A%257D%29%253B%22%2C%20%22mode%22%3A%22ria%22%7D">http://demo.qooxdoo.org/3.0/playground/#%7B%22code%22%3A%22%252F**%250A%2520*%2520This%2520is%2520the%2520main%2520application%2520class%2520of%2520your%2520custom%2520application%2520%2522listSync%2522%250A%2520*%250A%2520*%2520%2540asset%28listsync%252F*%29%250A%2520*%252F%25 0Aqx.Class.define%28%2522listsync.Application%2522%252C%250A%257B%250A%2520%2520extend%2520%253A%2520qx.application.Standalone%252C%250A%250A%2520%2520%252F*%250A%2520%2520*****************************************************************************%250A%2520%2520%2520%2520%2520MEMBERS%250A%2520%2520*****************************************************************************%250A%2520%2520*%252F%250A%250A%2520%2520members%2520%253A%250A%2520%2520%257B%250A%2520%2520%2520%2520%252F**%250A%2520%2520%2520%2520%2520*%2520This%2520method%2520contains%2520the%2520initial%2520application%2520code%2520and%2520gets%2520called%2520%250A%2520%2520%2520%2520%2520*%2520during%2520startup%2520of%2520the%2520application%250A%2520%2520%2520%2520%2520*%2520%250A%2520%2520%2520%2520%2520*%2520%2540lint%2520ignoreDeprecated%28alert%29%250A%2520%2520%2520%2520%2520*%252F%250A%2520%2520%2520%2520main%2520%253A%2520function%28%29%250A%2520%2520%2520%2520%257B%250A%2520%2520%2509%252F%252F%2520Call%2520sup er%2520class%250A%2509%2509this.base%28arguments%29%253B%250A%250A%2509%2509%252F%252F%2520Enable%2520logging%2520in%2520debug%2520variant%250A%2509%2509if%2520%28qx.core.Environment.get%28%2522qx.debug%2522%29%29%250A%2509%2509%257B%250A%2509%2509%252F%252F%2520support%2520native%2520logging%2520capabilities%252C%2520e.g.%2520Firebug%2520for%2520Firefox%250A%2509%2509qx.log.appender.Native%253B%250A%2509%2509%252F%252F%2520support%2520additional%2520cross-browser%2520console.%2520Press%2520F7%2520to%2520toggle%2520visibility%250A%2509%2509qx.log.appender.Console%253B%250A%2509%2509%257D%250A%250A%2509%2509%252F*%250A%2509%2509-------------------------------------------------------------------------%250A%2509%2509Below%2520is%2520your%2520actual%2520application%2520code...%250A%2509%2509-------------------------------------------------------------------------%250A%2509%2509*%252F%2509%2509%250A%250A%2509%2509var%2520list1%2520%253D%2520new%2520qx.ui.form.List%28%29%253B%250A%2509%2509 var%2520list2%2520%253D%2520new%2520qx.ui.form.List%28%29%253B%2520%2520%2509%250A%250A%2509%2509this.__listModel%2520%253D%2520new%2520qx.data.Array%28%29%253B%250A%2509%2509for%2520%28var%2520i%2520%253D%25200%253B%2520i%2520%253C%25207%253B%2520i%252B%252B%29%250A%2509%2509%257B%250A%2509%2509%2509var%2520value%2520%253D%2520%28i%2520%2525%25202%29%2520%253E%25200%253B%250A%2509%2509%2509this.__listModel.push%28new%2520listsync.ListItemModel%28value%252C%2520%2522Item%2520%2522%2520%252B%2520i%29%29%253B%250A%2509%2509%257D%250A%2509%2509%250A%2509%2509%252F%252F%2520bind%2520list1%2520one%2520to%2520model%250A%2509%2509var%2520controller1%2520%253D%2520new%2520qx.data.controller.List%28null%252C%2520list1%29%253B%250A%2509%2509controller1.setDelegate%28%257B%250A%2520%2520%2520%2520%2520%2520%2520%2520%250A%2509%2509%2509%252F%252F%2520create%2520item%2520for%2520list%2520%28create%2520%2522list%2522%2520item%29%250A%2509%2509%2509createItem%2520%253A%2520function%28%29%2520%257B% 250A%2509%2509%2509%2509%252F%252F%2520comment%2520out%2520second%2520line%2520and%2520remove%2520comment%2520from%2520first%2520line%250A%2509%2509%2509%2509%250A%2509%2509%2509%2509%252F%252F%2520return%2520new%2520listsync.ListItem%28%29%253B%2520%250A%2509%2509%2509%2509return%2520new%2520qx.ui.form.CheckBox%28%29%253B%250A%2509%2509%2509%257D%252C%250A%2509%2509%2509%250A%2509%2509%2509bindItem%2520%253A%2520function%28controller%252C%2520item%252C%2520id%29%2520%257B%250A%2509%2509%2509%2509%252F%252F%2520comment%2520out%2520last%2520four%2520lines%2520and%2520remove%2520comment%2520from%2520first%2520four%2520lines%250A%2509%2509%2509%2509%250A%2509%2509%2509%2509%252F%252F%2520controller.bindProperty%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindProperty%28%2522text%2522%252C%2520%2522text%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%252 0controller.bindPropertyReverse%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindPropertyReverse%28%2522text%2522%252C%2520%2522text%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindProperty%28%2522text%2522%252C%2520%2522label%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindProperty%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindPropertyReverse%28%2522text%2522%252C%2520%2522label%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindPropertyReverse%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%257D%2509%250A%2509%2509%257D%29%253B%2509%2520%2520%2509%2520%2520%250A%2509%2509%252F%252F%2520bind%2520model%2520of%2520contro ller%2520to%2520data%2520model%250A%2509%2509controller1.setModel%28this.__listModel%29%253B%250A%2509%2509%250A%2509%2509%252F%252F%2520bind%2520list2%2520one%2520to%2520model%250A%2509%2509var%2520controller2%2520%253D%2520new%2520qx.data.controller.List%28null%252C%2520list2%29%253B%250A%2509%2509controller2.setDelegate%28%257B%250A%2520%2520%2520%2520%2520%2520%2520%2520%250A%2509%2509%2509%252F%252F%2520create%2520item%2520for%2520list%2520%28create%2520%2522list%2522%2520item%29%250A%2509%2509%2509createItem%2520%253A%2520function%28%29%2520%257B%250A%2509%2509%2509%2509%252F%252F%2520return%2520new%2520listsync.ListItem%28%29%253B%250A%2509%2509%2509%2509return%2520new%2520qx.ui.form.CheckBox%28%29%253B%250A%2509%2509%2509%257D%252C%250A%2509%2509%2509%250A%2509%2509%2509bindItem%2520%253A%2520function%28controller%252C%2520item%252C%2520id%29%2520%257B%250A%2509%2509%2509%2509%252F%252F%2520comment%2520out%2520last%2520four%2520lines%2520and%2520remove%2520comment%2520from%252 0first%2520four%2520lines%250A%2509%2509%2509%2509%250A%2509%2509%2509%2509%252F%252F%2520controller.bindProperty%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindProperty%28%2522text%2522%252C%2520%2522text%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindPropertyReverse%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindPropertyReverse%28%2522text%2522%252C%2520%2522text%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindProperty%28%2522text%2522%252C%2520%2522label%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindProperty%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindProper tyReverse%28%2522text%2522%252C%2520%2522label%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindPropertyReverse%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%257D%2509%250A%2509%2509%257D%29%253B%2509%2520%2520%2509%2520%2520%250A%2509%2509%252F%252F%2520bind%2520model%2520of%2520controller%2520to%2520data%2520model%250A%2509%2509controller2.setModel%28this.__listModel%29%253B%250A%2509%2509%2509%2509%250A%2509%2509list1.setMinWidth%28150%29%253B%250A%2509%2509list2.setMinWidth%28150%29%253B%250A%2509%2509this.getRoot%28%29.add%28list1%252C%2520%257Bleft%2520%253A%2520100%252C%2520top%2520%253A%2520100%257D%29%253B%250A%2509%2509this.getRoot%28%29.add%28list2%252C%2520%257Bleft%2520%253A%2520300%252C%2520top%2520%253A%2520100%257D%29%253B%2520%250A%2509%2509%250A%2509%2509%252F%252F%2520add%2520description%2520for%2520the%2520to%2520lists%250A%2509%2509var%2520listLabel1%2520%25 3D%2520new%2520qx.ui.basic.Label%28%2522List%25201%253A%2522%29%253B%250A%2509%2509var%2520listLabel2%2520%253D%2520new%2520qx.ui.basic.Label%28%2522List%25202%253A%2522%29%253B%250A%2509%2509%250A%2509%2509%252F%252F%2520add%2520toggle%2520button%250A%2509%2509var%2520toggleButton%2520%253D%2520new%2520qx.ui.form.Button%28%2522Toogle%2522%29%250A%2509%2509toggleButton.setWidth%28350%29%253B%250A%2509%2509this.getRoot%28%29.add%28toggleButton%252C%2520%257Bleft%2520%253A%2520100%252C%2520top%2520%253A%2520320%257D%29%253B%250A%2509%2509toggleButton.addListener%28%2522execute%2522%252C%2520function%28%29%250A%2509%2509%257B%250A%2509%2509%2509var%2520listModel%2520%253D%2520this.__listModel.toArray%28%29%253B%250A%2509%2509%2509for%2520%28i%2520%253D%25200%253B%2520i%2520%253C%2520listModel.length%253B%2520i%252B%252B%29%250A%2509%2509%2509%257B%250A%2509%2509%2509%2509listModel%255Bi%255D.setValue%28!listModel%255Bi%255D.getValue%28%29%29%253B%250A%2509%2509%2509%257D%250A%2509%2509%2 57D%252C%2520this%29%253B%250A%2509%2509%250A%2509%2509this.getRoot%28%29.add%28listLabel1%252C%2520%257Bleft%2520%253A%2520100%252C%2520top%2520%253A%252080%257D%29%253B%250A%2509%2509this.getRoot%28%29.add%28listLabel2%252C%2520%257Bleft%2520%253A%2520300%252C%2520top%2520%253A%252080%257D%29%253B%250A%2520%2520%2520%2520%257D%250A%2520%2520%257D%250A%257D%29%253B%22%2C%20%22mode%22%3A%22ria%22%7D




-----Ursprüngliche Mitteilung-----
Von: Romeo Kenfack Tsakem [hidden email]
An: qooxdoo Development [hidden email]
Verschickt: Mi, 21 Aug 2013 11:53 am
Betreff: Re: [qooxdoo-devel] Bidirectional Data Binding for custom widget with CheckBox and TextField

Hi Lars,
 
Go to http://playground.qooxdoo.org and just paste your code there.
Save the code and send me the url.
 
Regards,
Romeo
 
Von: [hidden email] [[hidden email]]
Gesendet: Mittwoch, 21. August 2013 11:37
An: [hidden email]
Betreff: Re: [qooxdoo-devel] Bidirectional Data Binding for custom widget with CheckBox and TextField
 
Hi Romeo,

thanks for the quick response! How do I create a Playground Example?


Best,
Lars
 
-----Ursprüngliche Mitteilung-----
Von: Romeo Kenfack Tsakem <[hidden email]>
An: qooxdoo Development <[hidden email]>
Verschickt: Mi, 21 Aug 2013 11:21 am
Betreff: Re: [qooxdoo-devel] Bidirectional Data Binding for custom widget with CheckBox and TextField
Hi Lars,
 
can you please provide me a playground example ?
It will make it easier to understand and debug your code.
 
Regards,
Romeo
 
Von: [hidden email] [[hidden email]]
Gesendet: Mittwoch, 21. August 2013 10:53
An: [hidden email]
Betreff: [qooxdoo-devel] Bidirectional Data Binding for custom widget with CheckBox and TextField
 
Hi,

I am implementing a small mock-up application having two lists (qx.ui.form.List) synchronized
with an data array (qx.data.Array) via controller (qx.data.controller.List). I have implemented a
class representing a custom widget, which holds a qx.ui.form.CheckBox and a qx.ui.form.TextField.
The class outline of the custom widget is analogous to the example in the qooxdoo tutorial found
in the qooxdoo manual 3.0, chapter 4.7. The special thing about my application is that both lists
should be bound bidirectionally, so when I change a checkbox or the content of a textfield in list 1,
this will change the corresponding value in data model (containing the two properties "value" and
"text", equipped with events) and also the corresponding checkbox or textfield in list 2.
I have tested my application using a simple qx.ui.form.CheckBox and binding to the properties "value" and
"label", which works just fine. For the bidirectional binding I have used the methods bindProperty and
bindPropertyReverse inside the delegate of both controllers (I use one controller for binding the model
to list 1 and another controller for binding the model to list 2).
I have also tested my application using the unidirectional binding only (bindProperty method of controllers),
which also works, although the checkboxes are not editable and there is an error message on the console
saying:

"Uncaught TypeError: Object [object Object] has no method 'getLabel'..."

This seems partly logical to me, since I only have defined unidirectional binding.

However, using the method bindPropertyReverse in my bindItem function of my delegate results in the following
error on my browser console (listsync.ListItem is my custom widget):

"Uncaught Binding property value of object listsync.ListItem[73-0] not possible: No event available. : error..."

It would be great, if someone could help me in this matter. Really looking forward to your responses.
best,
L.
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk


_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Bidirectional Data Binding for custom widget with CheckBox and TextField

larseitzen
Thanks a lot for the hint. Shortened link:

http://demo.qooxdoo.org/3.0/playground/#
%7B%22code%22%3A%22%252F**%250A%2520*%25


best,
Lars


-----Ursprüngliche Mitteilung-----
Von: thron7 <[hidden email]>
An: qooxdoo Development <[hidden email]>
Verschickt: Mi, 21 Aug 2013 12:23 pm
Betreff: Re: [qooxdoo-devel] Bidirectional Data Binding for custom widget with CheckBox and TextField

You can use the Playground's "Shorten URL" button for such use cases.

T.

On 08/21/2013 12:04 PM, [hidden email] wrote:
Hi Romeo,

I have saved both files (Application.js and ListItem.js) as separate Items. The code lines for my custom widget are commented out and the code should work
as it is (bidirectional version using a simple CheckBox) . The link is the following:

<a class="moz-txt-link-freetext" target="_blank" href="http://demo.qooxdoo.org/3.0/playground/#%7B%22code%22%3A%22%252F**%250A%2520*%2520This%2520is%2520the%2520main%2520application%2520class%2520of%2520your%2520custom%2520application%2520%2522listSync%2522%250A%2520*%250A%2520*%2520%2540asset%28listsync%252F*%29%250A%2520*%252F%250Aqx.Class.define%28%2522listsync.Application%2522%252C%250A%257B%250A%2520%2520extend%2520%253A%2520qx.application.Standalone%252C%250A%250A%2520%2520%252F*%250A%2520%2520*****************************************************************************%250A%2520%2520%2520%2520%2520MEMBERS%250A%2520%2520*****************************************************************************%250A%2520%2520*%252F%250A%250A%2520%2520members%2520%253A%250A%2520%2520%257B%250A%2520%2520%2520%2520%252F**%250A%2520%2520%2520%2520%2520*%2520This%2520method%2520contains%2520the%2520initial%2520application%2520code%2520and%2520gets%2520called%2520%250A%2520%2520%2520%2520%2520*%2520during% 2520start up%2520of%2520the%2520application%250A%2520%2520%2520%2520%2520*%2520%250A%2520%2520%2520%2520%2520*%2520%2540lint%2520ignoreDeprecated%28alert%29%250A%2520%2520%2520%2520%2520*%252F%250A%2520%2520%2520%2520main%2520%253A%2520function%28%29%250A%2520%2520%2520%2520%257B%250A%2520%2520%2509%252F%252F%2520Call%2520super%2520class%250A%2509%2509this.base%28arguments%29%253B%250A%250A%2509%2509%252F%252F%2520Enable%2520logging%2520in%2520debug%2520variant%250A%2509%2509if%2520%28qx.core.Environment.get%28%2522qx.debug%2522%29%29%250A%2509%2509%257B%250A%2509%2509%252F%252F%2520support%2520native%2520logging%2520capabilities%252C%2520e.g.%2520Firebug%2520for%2520Firefox%250A%2509%2509qx.log.appender.Native%253B%250A%2509%2509%252F%252F%2520support%2520additional%2520cross-browser%2520console.%2520Press%2520F7%2520to%2520toggle%2520visibility%250A%2509%2509qx.log.appender.Console%253B%250A%2509%2509%257D%250A%250A%2509%2509%252F*%250A%2509%2509-------------------------------------- --------- --------------------------%250A%2509%2509Below%2520is%2520your%2520actual%2520application%2520code...%250A%2509%2509-------------------------------------------------------------------------%250A%2509%2509*%252F%2509%2509%250A%250A%2509%2509var%2520list1%2520%253D%2520new%2520qx.ui.form.List%28%29%253B%250A%2509%2509var%2520list2%2520%253D%2520new%2520qx.ui.form.List%28%29%253B%2520%2520%2509%250A%250A%2509%2509this.__listModel%2520%253D%2520new%2520qx.data.Array%28%29%253B%250A%2509%2509for%2520%28var%2520i%2520%253D%25200%253B%2520i%2520%253C%25207%253B%2520i%252B%252B%29%250A%2509%2509%257B%250A%2509%2509%2509var%2520value%2520%253D%2520%28i%2520%2525%25202%29%2520%253E%25200%253B%250A%2509%2509%2509this.__listModel.push%28new%2520listsync.ListItemModel%28value%252C%2520%2522Item%2520%2522%2520%252B%2520i%29%29%253B%250A%2509%2509%257D%250A%2509%2509%250A%2509%2509%252F%252F%2520bind%2520list1%2520one%2520to%2520model%250A%2509%2509var%2520controller1%2520%253D%2520new%2520 qx.data.c ontroller.List%28null%252C%2520list1%29%253B%250A%2509%2509controller1.setDelegate%28%257B%250A%2520%2520%2520%2520%2520%2520%2520%2520%250A%2509%2509%2509%252F%252F%2520create%2520item%2520for%2520list%2520%28create%2520%2522list%2522%2520item%29%250A%2509%2509%2509createItem%2520%253A%2520function%28%29%2520%257B%250A%2509%2509%2509%2509%252F%252F%2520comment%2520out%2520second%2520line%2520and%2520remove%2520comment%2520from%2520first%2520line%250A%2509%2509%2509%2509%250A%2509%2509%2509%2509%252F%252F%2520return%2520new%2520listsync.ListItem%28%29%253B%2520%250A%2509%2509%2509%2509return%2520new%2520qx.ui.form.CheckBox%28%29%253B%250A%2509%2509%2509%257D%252C%250A%2509%2509%2509%250A%2509%2509%2509bindItem%2520%253A%2520function%28controller%252C%2520item%252C%2520id%29%2520%257B%250A%2509%2509%2509%2509%252F%252F%2520comment%2520out%2520last%2520four%2520lines%2520and%2520remove%2520comment%2520from%2520first%2520four%2520lines%250A%2509%2509%2509%2509%250A%2509%2509%250 9%2509%25 2F%252F%2520controller.bindProperty%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindProperty%28%2522text%2522%252C%2520%2522text%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindPropertyReverse%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindPropertyReverse%28%2522text%2522%252C%2520%2522text%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindProperty%28%2522text%2522%252C%2520%2522label%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindProperty%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindPropertyReverse%28%2522text%2522%252C%2520%2522label%2522%252C%2520null%252 C%2520ite m%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindPropertyReverse%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%257D%2509%250A%2509%2509%257D%29%253B%2509%2520%2520%2509%2520%2520%250A%2509%2509%252F%252F%2520bind%2520model%2520of%2520controller%2520to%2520data%2520model%250A%2509%2509controller1.setModel%28this.__listModel%29%253B%250A%2509%2509%250A%2509%2509%252F%252F%2520bind%2520list2%2520one%2520to%2520model%250A%2509%2509var%2520controller2%2520%253D%2520new%2520qx.data.controller.List%28null%252C%2520list2%29%253B%250A%2509%2509controller2.setDelegate%28%257B%250A%2520%2520%2520%2520%2520%2520%2520%2520%250A%2509%2509%2509%252F%252F%2520create%2520item%2520for%2520list%2520%28create%2520%2522list%2522%2520item%29%250A%2509%2509%2509createItem%2520%253A%2520function%28%29%2520%257B%250A%2509%2509%2509%2509%252F%252F%2520return%2520new%2520listsync.ListItem%28%29%253B%250A%2509%2509%2509%2509ret urn%2520n ew%2520qx.ui.form.CheckBox%28%29%253B%250A%2509%2509%2509%257D%252C%250A%2509%2509%2509%250A%2509%2509%2509bindItem%2520%253A%2520function%28controller%252C%2520item%252C%2520id%29%2520%257B%250A%2509%2509%2509%2509%252F%252F%2520comment%2520out%2520last%2520four%2520lines%2520and%2520remove%2520comment%2520from%2520first%2520four%2520lines%250A%2509%2509%2509%2509%250A%2509%2509%2509%2509%252F%252F%2520controller.bindProperty%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindProperty%28%2522text%2522%252C%2520%2522text%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindPropertyReverse%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindPropertyReverse%28%2522text%2522%252C%2520%2522text%2522%252C%2520null%252C%2520item%252C%2520id%29%2 53B%250A% 2509%2509%2509%2509controller.bindProperty%28%2522text%2522%252C%2520%2522label%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindProperty%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindPropertyReverse%28%2522text%2522%252C%2520%2522label%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindPropertyReverse%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%257D%2509%250A%2509%2509%257D%29%253B%2509%2520%2520%2509%2520%2520%250A%2509%2509%252F%252F%2520bind%2520model%2520of%2520controller%2520to%2520data%2520model%250A%2509%2509controller2.setModel%28this.__listModel%29%253B%250A%2509%2509%2509%2509%250A%2509%2509list1.setMinWidth%28150%29%253B%250A%2509%2509list2.setMinWidth%28150%29%253B%250A%2509%2509this.getRoot%28%29.add%28list1%252C%2520%257Bleft%2520 %253A%252 0100%252C%2520top%2520%253A%2520100%257D%29%253B%250A%2509%2509this.getRoot%28%29.add%28list2%252C%2520%257Bleft%2520%253A%2520300%252C%2520top%2520%253A%2520100%257D%29%253B%2520%250A%2509%2509%250A%2509%2509%252F%252F%2520add%2520description%2520for%2520the%2520to%2520lists%250A%2509%2509var%2520listLabel1%2520%253D%2520new%2520qx.ui.basic.Label%28%2522List%25201%253A%2522%29%253B%250A%2509%2509var%2520listLabel2%2520%253D%2520new%2520qx.ui.basic.Label%28%2522List%25202%253A%2522%29%253B%250A%2509%2509%250A%2509%2509%252F%252F%2520add%2520toggle%2520button%250A%2509%2509var%2520toggleButton%2520%253D%2520new%2520qx.ui.form.Button%28%2522Toogle%2522%29%250A%2509%2509toggleButton.setWidth%28350%29%253B%250A%2509%2509this.getRoot%28%29.add%28toggleButton%252C%2520%257Bleft%2520%253A%2520100%252C%2520top%2520%253A%2520320%257D%29%253B%250A%2509%2509toggleButton.addListener%28%2522execute%2522%252C%2520function%28%29%250A%2509%2509%257B%250A%2509%2509%2509var%2520listModel%2520% 253D%2520 this.__listModel.toArray%28%29%253B%250A%2509%2509%2509for%2520%28i%2520%253D%25200%253B%2520i%2520%253C%2520listModel.length%253B%2520i%252B%252B%29%250A%2509%2509%2509%257B%250A%2509%2509%2509%2509listModel%255Bi%255D.setValue%28!listModel%255Bi%255D.getValue%28%29%29%253B%250A%2509%2509%2509%257D%250A%2509%2509%257D%252C%2520this%29%253B%250A%2509%2509%250A%2509%2509this.getRoot%28%29.add%28listLabel1%252C%2520%257Bleft%2520%253A%2520100%252C%2520top%2520%253A%252080%257D%29%253B%250A%2509%2509this.getRoot%28%29.add%28listLabel2%252C%2520%257Bleft%2520%253A%2520300%252C%2520top%2520%253A%252080%257D%29%253B%250A%2520%2520%2520%2520%257D%250A%2520%2520%257D%250A%257D%29%253B%22%2C%20%22mode%22%3A%22ria%22%7D">http://demo.qooxdoo.org/3.0/playground/#%7B%22code%22%3A%22%252F**%250A%2520*%2520This%2520is%2520the%2520main%2520application%2520class%2520of%2520your%2520custom%2520application%2520%2522listSync%2522%250A%2520*%250A%2520*%2520%2540asset%28listsync%252F*%29%250A%2520 *%252F%25 0Aqx.Class.define%28%2522listsync.Application%2522%252C%250A%257B%250A%2520%2520extend%2520%253A%2520qx.application.Standalone%252C%250A%250A%2520%2520%252F*%250A%2520%2520*****************************************************************************%250A%2520%2520%2520%2520%2520MEMBERS%250A%2520%2520*****************************************************************************%250A%2520%2520*%252F%250A%250A%2520%2520members%2520%253A%250A%2520%2520%257B%250A%2520%2520%2520%2520%252F**%250A%2520%2520%2520%2520%2520*%2520This%2520method%2520contains%2520the%2520initial%2520application%2520code%2520and%2520gets%2520called%2520%250A%2520%2520%2520%2520%2520*%2520during%2520startup%2520of%2520the%2520application%250A%2520%2520%2520%2520%2520*%2520%250A%2520%2520%2520%2520%2520*%2520%2540lint%2520ignoreDeprecated%28alert%29%250A%2520%2520%2520%2520%2520*%252F%250A%2520%2520%2520%2520main%2520%253A%2520function%28%29%250A%2520%2520%2520%2520%257B%250A%2520%2520%2509%252F%252F%2520Cal l%2520sup er%2520class%250A%2509%2509this.base%28arguments%29%253B%250A%250A%2509%2509%252F%252F%2520Enable%2520logging%2520in%2520debug%2520variant%250A%2509%2509if%2520%28qx.core.Environment.get%28%2522qx.debug%2522%29%29%250A%2509%2509%257B%250A%2509%2509%252F%252F%2520support%2520native%2520logging%2520capabilities%252C%2520e.g.%2520Firebug%2520for%2520Firefox%250A%2509%2509qx.log.appender.Native%253B%250A%2509%2509%252F%252F%2520support%2520additional%2520cross-browser%2520console.%2520Press%2520F7%2520to%2520toggle%2520visibility%250A%2509%2509qx.log.appender.Console%253B%250A%2509%2509%257D%250A%250A%2509%2509%252F*%250A%2509%2509-------------------------------------------------------------------------%250A%2509%2509Below%2520is%2520your%2520actual%2520application%2520code...%250A%2509%2509-------------------------------------------------------------------------%250A%2509%2509*%252F%2509%2509%250A%250A%2509%2509var%2520list1%2520%253D%2520new%2520qx.ui.form.List%28%29%253B%250A% 2509%2509 var%2520list2%2520%253D%2520new%2520qx.ui.form.List%28%29%253B%2520%2520%2509%250A%250A%2509%2509this.__listModel%2520%253D%2520new%2520qx.data.Array%28%29%253B%250A%2509%2509for%2520%28var%2520i%2520%253D%25200%253B%2520i%2520%253C%25207%253B%2520i%252B%252B%29%250A%2509%2509%257B%250A%2509%2509%2509var%2520value%2520%253D%2520%28i%2520%2525%25202%29%2520%253E%25200%253B%250A%2509%2509%2509this.__listModel.push%28new%2520listsync.ListItemModel%28value%252C%2520%2522Item%2520%2522%2520%252B%2520i%29%29%253B%250A%2509%2509%257D%250A%2509%2509%250A%2509%2509%252F%252F%2520bind%2520list1%2520one%2520to%2520model%250A%2509%2509var%2520controller1%2520%253D%2520new%2520qx.data.controller.List%28null%252C%2520list1%29%253B%250A%2509%2509controller1.setDelegate%28%257B%250A%2520%2520%2520%2520%2520%2520%2520%2520%250A%2509%2509%2509%252F%252F%2520create%2520item%2520for%2520list%2520%28create%2520%2522list%2522%2520item%29%250A%2509%2509%2509createItem%2520%253A%2520function%28%29%2 520%257B% 250A%2509%2509%2509%2509%252F%252F%2520comment%2520out%2520second%2520line%2520and%2520remove%2520comment%2520from%2520first%2520line%250A%2509%2509%2509%2509%250A%2509%2509%2509%2509%252F%252F%2520return%2520new%2520listsync.ListItem%28%29%253B%2520%250A%2509%2509%2509%2509return%2520new%2520qx.ui.form.CheckBox%28%29%253B%250A%2509%2509%2509%257D%252C%250A%2509%2509%2509%250A%2509%2509%2509bindItem%2520%253A%2520function%28controller%252C%2520item%252C%2520id%29%2520%257B%250A%2509%2509%2509%2509%252F%252F%2520comment%2520out%2520last%2520four%2520lines%2520and%2520remove%2520comment%2520from%2520first%2520four%2520lines%250A%2509%2509%2509%2509%250A%2509%2509%2509%2509%252F%252F%2520controller.bindProperty%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindProperty%28%2522text%2522%252C%2520%2522text%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F %252F%252 0controller.bindPropertyReverse%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindPropertyReverse%28%2522text%2522%252C%2520%2522text%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindProperty%28%2522text%2522%252C%2520%2522label%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindProperty%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindPropertyReverse%28%2522text%2522%252C%2520%2522label%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindPropertyReverse%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%257D%2509%250A%2509%2509%257D%29%253B%2509%2520%2520%2509%2520%2520%250A%2509%2509%252F%252F%2520bind%2520model%2520of%2 520contro ller%2520to%2520data%2520model%250A%2509%2509controller1.setModel%28this.__listModel%29%253B%250A%2509%2509%250A%2509%2509%252F%252F%2520bind%2520list2%2520one%2520to%2520model%250A%2509%2509var%2520controller2%2520%253D%2520new%2520qx.data.controller.List%28null%252C%2520list2%29%253B%250A%2509%2509controller2.setDelegate%28%257B%250A%2520%2520%2520%2520%2520%2520%2520%2520%250A%2509%2509%2509%252F%252F%2520create%2520item%2520for%2520list%2520%28create%2520%2522list%2522%2520item%29%250A%2509%2509%2509createItem%2520%253A%2520function%28%29%2520%257B%250A%2509%2509%2509%2509%252F%252F%2520return%2520new%2520listsync.ListItem%28%29%253B%250A%2509%2509%2509%2509return%2520new%2520qx.ui.form.CheckBox%28%29%253B%250A%2509%2509%2509%257D%252C%250A%2509%2509%2509%250A%2509%2509%2509bindItem%2520%253A%2520function%28controller%252C%2520item%252C%2520id%29%2520%257B%250A%2509%2509%2509%2509%252F%252F%2520comment%2520out%2520last%2520four%2520lines%2520and%2520remove%2520comment%252 0from%252 0first%2520four%2520lines%250A%2509%2509%2509%2509%250A%2509%2509%2509%2509%252F%252F%2520controller.bindProperty%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindProperty%28%2522text%2522%252C%2520%2522text%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindPropertyReverse%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509%252F%252F%2520controller.bindPropertyReverse%28%2522text%2522%252C%2520%2522text%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindProperty%28%2522text%2522%252C%2520%2522label%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindProperty%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.b indProper tyReverse%28%2522text%2522%252C%2520%2522label%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%2509controller.bindPropertyReverse%28%2522value%2522%252C%2520%2522value%2522%252C%2520null%252C%2520item%252C%2520id%29%253B%250A%2509%2509%2509%257D%2509%250A%2509%2509%257D%29%253B%2509%2520%2520%2509%2520%2520%250A%2509%2509%252F%252F%2520bind%2520model%2520of%2520controller%2520to%2520data%2520model%250A%2509%2509controller2.setModel%28this.__listModel%29%253B%250A%2509%2509%2509%2509%250A%2509%2509list1.setMinWidth%28150%29%253B%250A%2509%2509list2.setMinWidth%28150%29%253B%250A%2509%2509this.getRoot%28%29.add%28list1%252C%2520%257Bleft%2520%253A%2520100%252C%2520top%2520%253A%2520100%257D%29%253B%250A%2509%2509this.getRoot%28%29.add%28list2%252C%2520%257Bleft%2520%253A%2520300%252C%2520top%2520%253A%2520100%257D%29%253B%2520%250A%2509%2509%250A%2509%2509%252F%252F%2520add%2520description%2520for%2520the%2520to%2520lists%250A%2509%2509var%2520listLabel 1%2520%25 3D%2520new%2520qx.ui.basic.Label%28%2522List%25201%253A%2522%29%253B%250A%2509%2509var%2520listLabel2%2520%253D%2520new%2520qx.ui.basic.Label%28%2522List%25202%253A%2522%29%253B%250A%2509%2509%250A%2509%2509%252F%252F%2520add%2520toggle%2520button%250A%2509%2509var%2520toggleButton%2520%253D%2520new%2520qx.ui.form.Button%28%2522Toogle%2522%29%250A%2509%2509toggleButton.setWidth%28350%29%253B%250A%2509%2509this.getRoot%28%29.add%28toggleButton%252C%2520%257Bleft%2520%253A%2520100%252C%2520top%2520%253A%2520320%257D%29%253B%250A%2509%2509toggleButton.addListener%28%2522execute%2522%252C%2520function%28%29%250A%2509%2509%257B%250A%2509%2509%2509var%2520listModel%2520%253D%2520this.__listModel.toArray%28%29%253B%250A%2509%2509%2509for%2520%28i%2520%253D%25200%253B%2520i%2520%253C%2520listModel.length%253B%2520i%252B%252B%29%250A%2509%2509%2509%257B%250A%2509%2509%2509%2509listModel%255Bi%255D.setValue%28!listModel%255Bi%255D.getValue%28%29%29%253B%250A%2509%2509%2509%257D%250A%25 09%2509%2 57D%252C%2520this%29%253B%250A%2509%2509%250A%2509%2509this.getRoot%28%29.add%28listLabel1%252C%2520%257Bleft%2520%253A%2520100%252C%2520top%2520%253A%252080%257D%29%253B%250A%2509%2509this.getRoot%28%29.add%28listLabel2%252C%2520%257Bleft%2520%253A%2520300%252C%2520top%2520%253A%252080%257D%29%253B%250A%2520%2520%2520%2520%257D%250A%2520%2520%257D%250A%257D%29%253B%22%2C%20%22mode%22%3A%22ria%22%7D




-----Ursprüngliche Mitteilung-----
Von: Romeo Kenfack Tsakem [hidden email]
An: qooxdoo Development [hidden email]
Verschickt: Mi, 21 Aug 2013 11:53 am
Betreff: Re: [qooxdoo-devel] Bidirectional Data Binding for custom widget with CheckBox and TextField

Hi Lars,
 
Go to http://playground.qooxdoo.org and just paste your code there.
Save the code and send me the url.
 
Regards,
Romeo
 
Von: [hidden email] [[hidden email]]
Gesendet: Mittwoch, 21. August 2013 11:37
An: [hidden email]
Betreff: Re: [qooxdoo-devel] Bidirectional Data Binding for custom widget with CheckBox and TextField
 
Hi Romeo,

thanks for the quick response! How do I create a Playground Example?


Best,
Lars
 
-----Ursprüngliche Mitteilung-----
Von: Romeo Kenfack Tsakem <[hidden email]>
An: qooxdoo Development <[hidden email]>
Verschickt: Mi, 21 Aug 2013 11:21 am
Betreff: Re: [qooxdoo-devel] Bidirectional Data Binding for custom widget with CheckBox and TextField
Hi Lars,
 
can you please provide me a playground example ?
It will make it easier to understand and debug your code.
 
Regards,
Romeo
 
Von: [hidden email] [[hidden email]]
Gesendet: Mittwoch, 21. August 2013 10:53
An: [hidden email]
Betreff: [qooxdoo-devel] Bidirectional Data Binding for custom widget with CheckBox and TextField
 
Hi,

I am implementing a small mock-up application having two lists (qx.ui.form.List) synchronized
with an data array (qx.data.Array) via controller (qx.data.controller.List). I have implemented a
class representing a custom widget, which holds a qx.ui.form.CheckBox and a qx.ui.form.TextField.
The class outline of the custom widget is analogous to the example in the qooxdoo tutorial found
in the qooxdoo manual 3.0, chapter 4.7. The special thing about my application is that both lists
should be bound bidirectionally, so when I change a checkbox or the content of a textfield in list 1,
this will change the corresponding value in data model (containing the two properties "value" and
"text", equipped with events) and also the corresponding checkbox or textfield in list 2.
I have tested my application using a simple qx.ui.form.CheckBox and binding to the properties "value" and
"label", which works just fine. For the bidirectional binding I have used the methods bindProperty and
bindPropertyReverse inside the delegate of both controllers (I use one controller for binding the model
to list 1 and another controller for binding the model to list 2).
I have also tested my application using the unidirectional binding only (bindProperty method of controllers),
which also works, although the checkboxes are not editable and there is an error message on the console
saying:

"Uncaught TypeError: Object [object Object] has no method 'getLabel'..."

This seems partly logical to me, since I only have defined unidirectional binding.

However, using the method bindPropertyReverse in my bindItem function of my delegate results in the following
error on my browser console (listsync.ListItem is my custom widget):

"Uncaught Binding property value of object listsync.ListItem[73-0] not possible: No event available. : error..."

It would be great, if someone could help me in this matter. Really looking forward to your responses.
best,
L.
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk


_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Bidirectional Data Binding for custom widget with CheckBox and TextField

Thomas Herchenroeder

On 08/21/2013 01:13 PM, [hidden email] wrote:
Thanks a lot for the hint. Shortened link:

http://demo.qooxdoo.org/3.0/playground/#
%7B%22code%22%3A%22%252F**%250A%2520*%25


That's most probably not a shortend link, which would be a TinyURL link. Try pasting it in your browser.

T.


------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Bidirectional Data Binding for custom widget with CheckBox and TextField

larseitzen
Alright, I'm sorry. Here comes the shortened link:

http://tinyurl.com/laylvwk


best regards,
Lars

-----Ursprüngliche Mitteilung-----
Von: thron7 <[hidden email]>
An: qooxdoo Development <[hidden email]>
Verschickt: Mi, 21 Aug 2013 2:39 pm
Betreff: Re: [qooxdoo-devel] Bidirectional Data Binding for custom widget with CheckBox and TextField


On 08/21/2013 01:13 PM, [hidden email] wrote:
Thanks a lot for the hint. Shortened link:

http://demo.qooxdoo.org/3.0/playground/#
%7B%22code%22%3A%22%252F**%250A%2520*%25


That's most probably not a shortend link, which would be a TinyURL link. Try pasting it in your browser.

T.

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Bidirectional Data Binding for custom widget with CheckBox and TextField

larseitzen
In reply to this post by Thomas Herchenroeder
Hi,

I have solved the bidirectional data binding issue now. It didn't work,
because I still had to realize the class-internal data binding (in the class ListItem),
which has to be established between the class properties ("value" and "text") and the
corresponding properties of the used widgets (CheckBox and TextField).

Unfortunately I'm still not able to change the state of the CheckBoxes. Is there a
way to somehow make checkBoxes editable?

regards,
Lars


-----Ursprüngliche Mitteilung-----
Von: thron7 <[hidden email]>
An: qooxdoo Development <[hidden email]>
Verschickt: Mi, 21 Aug 2013 2:39 pm
Betreff: Re: [qooxdoo-devel] Bidirectional Data Binding for custom widget with CheckBox and TextField


On 08/21/2013 01:13 PM, [hidden email] wrote:
Thanks a lot for the hint. Shortened link:

http://demo.qooxdoo.org/3.0/playground/#
%7B%22code%22%3A%22%252F**%250A%2520*%25


That's most probably not a shortend link, which would be a TinyURL link. Try pasting it in your browser.

T.

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Bidirectional Data Binding for custom widget with CheckBox and TextField

Thomas Herchenroeder

On 08/21/2013 04:13 PM, [hidden email] wrote:
Unfortunately I'm still not able to change the state of the CheckBoxes. Is there a
way to somehow make checkBoxes editable?

Mh, what do you mean? CheckBoxes are editable. Are you trying to change their state by clicking with the mouse, or programmatically from your JS code?

T.


------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Bidirectional Data Binding for custom widget with CheckBox and TextField

larseitzen
In reply to this post by larseitzen
Hi,

I'm trying to change the checkbox states by clicking on them, but it doesn't work.

Also when I add buttons to my custom widget, these can not be activated by clicking on them
and listeners bound to them do not work.

Best,
Lars



------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Bidirectional Data Binding for custom widget with CheckBox and TextField

larseitzen
In reply to this post by Thomas Herchenroeder
Hi,

changing the checkboxes states programmatically does work.

I am trying to change the checkbox state by clicking on them, but this doesn't work.
Also when I add buttons these cannot be used either.


Best,
Lars


-----Ursprüngliche Mitteilung-----
Von: thron7 <[hidden email]>
An: qooxdoo Development <[hidden email]>
Verschickt: Fr, 23 Aug 2013 4:49 am
Betreff: Re: [qooxdoo-devel] Bidirectional Data Binding for custom widget with CheckBox and TextField


On 08/21/2013 04:13 PM, [hidden email] wrote:
Unfortunately I'm still not able to change the state of the CheckBoxes. Is there a
way to somehow make checkBoxes editable?

Mh, what do you mean? CheckBoxes are editable. Are you trying to change their state by clicking with the mouse, or programmatically from your JS code?

T.

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Bidirectional Data Binding for custom widget with CheckBox and TextField

Thomas Herchenroeder
In reply to this post by larseitzen
Please create a Playground [1] sample that shows the problem, and post the link to it (use "Shorten URL").

T.

[1] http://playground.qooxdoo.org/

On 08/22/2013 05:08 PM, [hidden email] wrote:
Hi,

I'm trying to change the checkbox states by clicking on them, but it doesn't work.

Also when I add buttons to my custom widget, these can not be activated by clicking on them
and listeners bound to them do not work.

Best,
Lars




------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk


_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Bidirectional Data Binding for custom widget with CheckBox and TextField

Christian Hagendorn
Administrator
In reply to this post by larseitzen
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Bidirectional Data Binding for custom widget with CheckBox and TextField

larseitzen
Hi, Chris.

Yes, of course. I'm sorry, I forgot to include that file.

I have uploaded a running example to the link:
 

http://tinyurl.com/kn4ypxv

Best,
Lars

-----Ursprüngliche Mitteilung-----
Von: Christian Hagendorn <[hidden email]>
An: qooxdoo-devel <[hidden email]>
Verschickt: Mo, 26 Aug 2013 10:30 am
Betreff: Re: [qooxdoo-devel] Bidirectional Data Binding for custom widget with CheckBox and TextField

Hi Lars,

the playground example doesn't work. The implementation for the
listsync.ListItemModel is missing. Could you please provide a running
example. Otherwise it is not possible to reproduce your issue.

Cheers.
Chris



--
View this message in context: http://qooxdoo.678.n2.nabble.com/Bidirectional-Data-Binding-for-custom-widget-with-CheckBox-and-TextField-tp7584421p7584467.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Bidirectional Data Binding for custom widget with CheckBox and TextField

Christian Hagendorn
Administrator
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Bidirectional Data Binding for custom widget with CheckBox and TextField

larseitzen
Hey Chris,

thanks a lot. Many thanks to T. as well!


best,
Lars


-----Ursprüngliche Mitteilung-----
Von: Christian Hagendorn <[hidden email]>
An: qooxdoo-devel <[hidden email]>
Verschickt: Mo, 26 Aug 2013 12:31 pm
Betreff: Re: [qooxdoo-devel] Bidirectional Data Binding for custom widget with CheckBox and TextField

Hi Lars,

you are setting the CheckBox and Button as anonymous:
control.setAnonymous(true);

As you can read [1], the widget doesn't receive any events, therefore you
can't click it. Remove these lines form your widget and it works as
expected:
http://tinyurl.com/lrgjh7t

Cheers,
Chris


[1]
http://demo.qooxdoo.org/current/apiviewer/#qx.ui.core.Widget~anonymous!property



--
View this message in context: http://qooxdoo.678.n2.nabble.com/Bidirectional-Data-Binding-for-custom-widget-with-CheckBox-and-TextField-tp7584421p7584470.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel