problem with SelectBox and rich ListItems

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

problem with SelectBox and rich ListItems

Petr Kobalíček
Hi,

I'm getting troubles with SelectBox with rich list items. Select box
escapes the items. Is this bug?

Playground:

http://demo.qooxdoo.org/current/playground/#%7B%22code%22%3A%20%22var%2520doc%2520%253D%2520this.getRoot%28%29%253B%250A%250Avar%2520listbox%2520%253D%2520new%2520qx.ui.form.SelectBox%28%29%253B%250A%250Afor%2520%28var%2520i%2520%253D%25200%253B%2520i%2520%253C%252010%253B%2520i%252B%252B%29%250A%257B%250A%2520%2520var%2520item%2520%253D%2520new%2520qx.ui.form.ListItem%28%29%253B%250A%2520%2520item.setRich%28true%29%253B%250A%2520%2520item.setLabel%28%2522%253Cspan%2520style%253D%27color%253Ared%27%253E%2522%2520%252B%2520i%2520%252B%2520%2522%253C%252Fspan%2522%29%253B%250A%2520%2520listbox.add%28item%29%253B%250A%257D%250A%250Adoc.add%28listbox%252C%2520%257Bleft%253A50%252C%2520right%253A%252040%257D%29%253B%250A%250A%22%7D

Sample code:

var doc = this.getRoot();

var listbox = new qx.ui.form.SelectBox();

for (var i = 0; i < 10; i++)
{
  var item = new qx.ui.form.ListItem();
  item.setRich(true);
  item.setLabel("<span style='color:red'>" + i + "</span");
  listbox.add(item);
}

doc.add(listbox, {left:50, right: 40});

--
Best regards
- Petr Kobalicek <http://kobalicek.com>

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: problem with SelectBox and rich ListItems

Fabian Jakobs
Administrator
Hi Petr,

I think this is a bug. Could you open a bug report for it? Until it is
fixed you can set the "rich" property of the "atom" sub widget manually:

listbox.getChildControl("atom").setRich(true);

http://demo.qooxdoo.org/current/playground/#%7B%22code%22%3A%20%22var%2520doc%2520%253D%2520this.getRoot%28%29%253B%250A%250Avar%2520listbox%2520%253D%2520new%2520qx.ui.form.SelectBox%28%29%253B%250Alistbox.getChildControl%28%2522atom%2522%29.setRich%28true%29%253B%250A%250Afor%2520%28var%2520i%2520%253D%25200%253B%2520i%2520%253C%252010%253B%2520i%252B%252B%29%250A%257B%250A%2520%2520var%2520item%2520%253D%2520new%2520qx.ui.form.ListItem%28%29%253B%250A%2520%2520item.setRich%28true%29%253B%250A%2520%2520item.setLabel%28%2522%253Cspan%2520style%253D%27color%253Ared%27%253E%2522%2520%252B%2520i%2520%252B%2520%2522%253C%252Fspan%2522%29%253B%250A%2520%2520listbox.add%28item%29%253B%250A%257D%250A%250Adoc.add%28listbox%252C%2520%257Bleft%253A50%252C%2520right%253A%252040%257D%29%253B%250A%250A%22%7D

Best Fabian

BTW: It was really helpful to link to the playground. Thanks

--
Fabian Jakobs
JavaScript Framework Developer

1&1 Internet AG - Web Technologies
Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
Telefon: +49 721 91374-6784
[hidden email]

Amtsgericht Montabaur / HRB 6484
Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver Mauss, Jan Oetjen
Aufsichtsratsvorsitzender: Michael Scheeren


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: problem with SelectBox and rich ListItems

Stefan Volbers
In reply to this post by Petr Kobalíček
Seems to me like a bug.

Please try exchanging listbox with
var listbox = new qx.ui.form.List();
        // works as expected
and
var listbox = new qx.ui.form.ComboBox();
        // open the ComboBox to see unexpected results

Greetings
Stefan

Petr Kobalíček wrote:
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: problem with SelectBox and rich ListItems

Noggin182
In reply to this post by Fabian Jakobs
I think somebody reported this as a bug last week?

Fabian Jakobs wrote:

> Hi Petr,
>
> I think this is a bug. Could you open a bug report for it? Until it is
> fixed you can set the "rich" property of the "atom" sub widget manually:
>
> listbox.getChildControl("atom").setRich(true);
>
> http://demo.qooxdoo.org/current/playground/#%7B%22code%22%3A%20%22var%2520doc%2520%253D%2520this.getRoot%28%29%253B%250A%250Avar%2520listbox%2520%253D%2520new%2520qx.ui.form.SelectBox%28%29%253B%250Alistbox.getChildControl%28%2522atom%2522%29.setRich%28true%29%253B%250A%250Afor%2520%28var%2520i%2520%253D%25200%253B%2520i%2520%253C%252010%253B%2520i%252B%252B%29%250A%257B%250A%2520%2520var%2520item%2520%253D%2520new%2520qx.ui.form.ListItem%28%29%253B%250A%2520%2520item.setRich%28true%29%253B%250A%2520%2520item.setLabel%28%2522%253Cspan%2520style%253D%27color%253Ared%27%253E%2522%2520%252B%2520i%2520%252B%2520%2522%253C%252Fspan%2522%29%253B%250A%2520%2520listbox.add%28item%29%253B%250A%257D%250A%250Adoc.add%28listbox%252C%2520%257Bleft%253A50%252C%2520right%253A%252040%257D%29%253B%250A%250A%22%7D
>
> Best Fabian
>
> BTW: It was really helpful to link to the playground. Thanks
>> Hi,
>>
>> I'm getting troubles with SelectBox with rich list items. Select box
>> escapes the items. Is this bug?
>>
>> Playground:
>>
>> http://demo.qooxdoo.org/current/playground/#%7B%22code%22%3A%20%22var%2520doc%2520%253D%2520this.getRoot%28%29%253B%250A%250Avar%2520listbox%2520%253D%2520new%2520qx.ui.form.SelectBox%28%29%253B%250A%250Afor%2520%28var%2520i%2520%253D%25200%253B%2520i%2520%253C%252010%253B%2520i%252B%252B%29%250A%257B%250A%2520%2520var%2520item%2520%253D%2520new%2520qx.ui.form.ListItem%28%29%253B%250A%2520%2520item.setRich%28true%29%253B%250A%2520%2520item.setLabel%28%2522%253Cspan%2520style%253D%27color%253Ared%27%253E%2522%2520%252B%2520i%2520%252B%2520%2522%253C%252Fspan%2522%29%253B%250A%2520%2520listbox.add%28item%29%253B%250A%257D%250A%250Adoc.add%28listbox%252C%2520%257Bleft%253A50%252C%2520right%253A%252040%257D%29%253B%250A%250A%22%7D
>>
>> Sample code:
>>
>> var doc = this.getRoot();
>>
>> var listbox = new qx.ui.form.SelectBox();
>>
>> for (var i = 0; i < 10; i++)
>> {
>>   var item = new qx.ui.form.ListItem();
>>   item.setRich(true);
>>   item.setLabel("<span style='color:red'>" + i + "</span");
>>   listbox.add(item);
>> }
>>
>> doc.add(listbox, {left:50, right: 40});
>>
>>  
>
>


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: problem with SelectBox and rich ListItems

Petr Kobalíček
In reply to this post by Fabian Jakobs
Hi, of course, it's #2925.

Thanks for the tip!

--
Best regards
- Petr Kobalicek <http://kobalicek.com>

2009/10/13 Fabian Jakobs <[hidden email]>:

> Hi Petr,
>
> I think this is a bug. Could you open a bug report for it? Until it is
> fixed you can set the "rich" property of the "atom" sub widget manually:
>
> listbox.getChildControl("atom").setRich(true);
>
> http://demo.qooxdoo.org/current/playground/#%7B%22code%22%3A%20%22var%2520doc%2520%253D%2520this.getRoot%28%29%253B%250A%250Avar%2520listbox%2520%253D%2520new%2520qx.ui.form.SelectBox%28%29%253B%250Alistbox.getChildControl%28%2522atom%2522%29.setRich%28true%29%253B%250A%250Afor%2520%28var%2520i%2520%253D%25200%253B%2520i%2520%253C%252010%253B%2520i%252B%252B%29%250A%257B%250A%2520%2520var%2520item%2520%253D%2520new%2520qx.ui.form.ListItem%28%29%253B%250A%2520%2520item.setRich%28true%29%253B%250A%2520%2520item.setLabel%28%2522%253Cspan%2520style%253D%27color%253Ared%27%253E%2522%2520%252B%2520i%2520%252B%2520%2522%253C%252Fspan%2522%29%253B%250A%2520%2520listbox.add%28item%29%253B%250A%257D%250A%250Adoc.add%28listbox%252C%2520%257Bleft%253A50%252C%2520right%253A%252040%257D%29%253B%250A%250A%22%7D
>
> Best Fabian
>
> BTW: It was really helpful to link to the playground. Thanks
>> Hi,
>>
>> I'm getting troubles with SelectBox with rich list items. Select box
>> escapes the items. Is this bug?
>>
>> Playground:
>>
>> http://demo.qooxdoo.org/current/playground/#%7B%22code%22%3A%20%22var%2520doc%2520%253D%2520this.getRoot%28%29%253B%250A%250Avar%2520listbox%2520%253D%2520new%2520qx.ui.form.SelectBox%28%29%253B%250A%250Afor%2520%28var%2520i%2520%253D%25200%253B%2520i%2520%253C%252010%253B%2520i%252B%252B%29%250A%257B%250A%2520%2520var%2520item%2520%253D%2520new%2520qx.ui.form.ListItem%28%29%253B%250A%2520%2520item.setRich%28true%29%253B%250A%2520%2520item.setLabel%28%2522%253Cspan%2520style%253D%27color%253Ared%27%253E%2522%2520%252B%2520i%2520%252B%2520%2522%253C%252Fspan%2522%29%253B%250A%2520%2520listbox.add%28item%29%253B%250A%257D%250A%250Adoc.add%28listbox%252C%2520%257Bleft%253A50%252C%2520right%253A%252040%257D%29%253B%250A%250A%22%7D
>>
>> Sample code:
>>
>> var doc = this.getRoot();
>>
>> var listbox = new qx.ui.form.SelectBox();
>>
>> for (var i = 0; i < 10; i++)
>> {
>>   var item = new qx.ui.form.ListItem();
>>   item.setRich(true);
>>   item.setLabel("<span style='color:red'>" + i + "</span");
>>   listbox.add(item);
>> }
>>
>> doc.add(listbox, {left:50, right: 40});
>>
>>
>
>
> --
> Fabian Jakobs
> JavaScript Framework Developer
>
> 1&1 Internet AG - Web Technologies
> Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
> Telefon: +49 721 91374-6784
> [hidden email]
>
> Amtsgericht Montabaur / HRB 6484
> Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver Mauss, Jan Oetjen
> Aufsichtsratsvorsitzender: Michael Scheeren
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: problem with SelectBox and rich ListItems

Fabian Jakobs
Administrator
Petr Kobalíček schrieb:
> Hi, of course, it's #2925.
>
> Thanks for the tip!
>
>  
Thanks, how could I miss this :-)

Best Fabian

--
Fabian Jakobs
JavaScript Framework Developer

1&1 Internet AG - Web Technologies
Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
Telefon: +49 721 91374-6784
[hidden email]

Amtsgericht Montabaur / HRB 6484
Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver Mauss, Jan Oetjen
Aufsichtsratsvorsitzender: Michael Scheeren


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel