The problem is that the properties must be configured to fire an event when
the value changes; without this event, the Controller fails to bind to the
object to get even the initial value.  Change your class to:

> qx.Class.define("my.kvp",
> {
>     extend: qx.core.Object,
>  
>     properties:
>     {
>         key:
>         {
>             nullable: true,
>             event: "changeKey"
>         },
>         value:
>         {
>             nullable: true,
>             event: "changeValue"
>         }
> }});
>  
A tip is that when working in the playground, Qooxdoo¹s debug checks are
turned off so even in the debugger I couldn¹t pick up what was wrong ­ as
soon as I copied & pasted your code into a skeleton application and compiled
with ³./generate.py source² I could see the problem straight away.

John

From:  "Geissler, Martin" <martin.geiss...@wika.com>
Reply-To:  qooxdoo Development <qooxdoo-devel@lists.sourceforge.net>
Date:  Monday, 13 July 2015 18:28
To:  qooxdoo Development <qooxdoo-devel@lists.sourceforge.net>
Subject:  Re: [qooxdoo-devel] Fill Select Box via qx.data.controller.List
with Array of qx.Objects looks empty

Hello, 
 
My tinyurl did not work, so here is my code:
 
qx.Class.define("my.kvp",
{
    extend: qx.core.Object,
 
    properties:
    {
        key:
       {
            nullable: true
        },
        value:
        {
            nullable: true
        }
}});
 
var data = [];
var obj = new my.kvp();
obj.setValue("Hello");
obj.setKey("1");
 
var obj2 = new my.kvp();
obj2.setValue("World");
obj2.setKey("2");
 
data.push(obj);
data.push(obj2);
var kvparray = new qx.data.Array(data);
 
var selectBox = new qx.ui.form.SelectBox();
var controller = new qx.data.controller.List(kvparray, selectBox, "value");
 
this.getRoot().add(selectBox, { left : 50, top : 50});
 
 

Von: Geissler, Martin [mailto:martin.geiss...@wika.com]
Gesendet: Montag, 13. Juli 2015 19:01
An: qooxdoo-devel@lists.sourceforge.net
Betreff: [qooxdoo-devel] Fill Select Box via qx.data.controller.List with
Array of qx.Objects looks empty
 
Hello,
 
I try to use the qx.data.controller.List to fill a Select Box with values
from an Array of my handmade Qooxdoo Objects.
 
But the resulting Select Box did not show the values as expected. It looks
³empty²
 
Please see my code on playground:
 
http://tinyurl.com/ltmgf36
 
What Did I miss?
 
Thank you very much
 
Kind regards
 
Martin Geißler
--
 <http://en-co.wika.de/a_10_en_co.WIKA?utm_campaign=E-Mail-Banner-EN-CO-2015
&utm_source=EB-EN-CO-2015-27-A-10-BlockDesign&utm_medium=E-Mail-Banner>
--
 P  Bevor Sie diese E-Mail ausdrucken, überlegen Sie bitte, ob dies wirklich
erforderlich ist. Please think before you print.
--
WIKA Alexander Wiegand SE & Co. KG, Klingenberg - Germany
Kommanditgesellschaft: Sitz Klingenberg - Amtsgericht Aschaffenburg HRA 1819
Komplementärin: WIKA Verwaltungs SE & Co. KG - Sitz Klingenberg -
Amtsgericht Aschaffenburg HRA 4685
Komplementärin: WIKA International SE - Sitz Klingenberg - Amtsgericht
Aschaffenburg HRB 10505
Vorstand: Alexander Wiegand - Vorsitzender des Aufsichtsrats: Dr. Max Egli
-- 

The information contained in this E-Mail and any attached files are strictly
confidential and may be subject to legal privilege. If you are not the
intended recipient, his representative or the person responsible for
delivering the message to the intended recipient, be advised that you have
received this message in error and that any dissemination, copying or use of
this message or attachment is strictly forbidden, as is the disclosure of
the information therein. If you have received this E-Mail in error, please
notify us immediately by E-Mail or telephone and delete this message and all
its attachments subsequently. All reasonable precautions have been taken to
ensure no viruses are present in this E-Mail.
--
 <http://en-co.wika.de/a_10_en_co.WIKA?utm_campaign=E-Mail-Banner-EN-CO-2015
&utm_source=EB-EN-CO-2015-27-A-10-BlockDesign&utm_medium=E-Mail-Banner>
--
 P   Bevor Sie diese E-Mail ausdrucken, überlegen Sie bitte, ob dies
wirklich erforderlich ist. Please think before you print.
--
WIKA Alexander Wiegand SE & Co. KG, Klingenberg - Germany
Kommanditgesellschaft: Sitz Klingenberg - Amtsgericht Aschaffenburg HRA 1819
Komplementärin: WIKA Verwaltungs SE & Co. KG - Sitz Klingenberg -
Amtsgericht Aschaffenburg HRA 4685
Komplementärin: WIKA International SE - Sitz Klingenberg - Amtsgericht
Aschaffenburg HRB 10505
Vorstand: Alexander Wiegand - Vorsitzender des Aufsichtsrats: Dr. Max Egli
-- 
The information contained in this E-Mail and any attached files are strictly
confidential and may be subject to legal privilege. If you are not the
intended recipient, his representative or the person responsible for
delivering the message to the intended recipient, be advised that you have
received this message in error and that any dissemination, copying or use of
this message or attachment is strictly forbidden, as is the disclosure of
the information therein. If you have received this E-Mail in error, please
notify us immediately by E-Mail or telephone and delete this message and all
its attachments subsequently. All reasonable precautions have been taken to
ensure no viruses are present in this E-Mail.
----------------------------------------------------------------------------
-- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions
provide you with the tools and support that you need to offload your IT
needs and focus on growing your business. Configured For All Businesses.
Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________
qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to