Fill Select Box via qx.data.controller.List with Array of qx.Objects looks empty

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

Fill Select Box via qx.data.controller.List with Array of qx.Objects looks empty

Geissler, Martin

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

--

--

 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Fill Select Box via qx.data.controller.List with Array of qx.Objects looks empty

Geissler, Martin

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:[hidden email]]
Gesendet: Montag, 13. Juli 2015 19:01
An: [hidden email]
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

--

--

 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.

--

--

 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Fill Select Box via qx.data.controller.List with Array of qx.Objects looks empty

Loren Schlomer-2

It's been a little while (so I may be entirely wrong...)  but instead of extending qx.core.Object, try extending from qx.ui.form.ListItem

 

http://demo.qooxdoo.org/current/apiviewer/#qx.ui.form.ListItem

 

 

On 2015-07-13 10:28, Geissler, Martin wrote:

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:[hidden email]]
Gesendet: Montag, 13. Juli 2015 19:01
An: [hidden email]
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

--

--

 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.

--

--

 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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Fill Select Box via qx.data.controller.List with Array of qx.Objects looks empty

John Spackman-3
In reply to this post by Geissler, Martin
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" <[hidden email]>
Reply-To: qooxdoo Development <[hidden email]>
Date: Monday, 13 July 2015 18:28
To: qooxdoo Development <[hidden email]>
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 [[hidden email]]
Gesendet: Montag, 13. Juli 2015 19:01
An: [hidden email]
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

--

--

 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.

--

--

 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 [hidden email] 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel