qx mobile: enable to use selectBox inside popup window

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

qx mobile: enable to use selectBox inside popup window

slah
Hello,
I'm struggling to make SelectBox show option when it's displayed in a popup window.

Here's an example: http://tinyurl.com/oo2zbgp

when you display the popup and try to select "Language" the list didn't show options, but when you tap the close popup button then you can see options.

Is it a bug or I'm missing something else?

Regards,
Reply | Threaded
Open this post in threaded view
|

Re: qx mobile: enable to use selectBox inside popup window

czuendorf
To pre-select one option please set the selectedIndex to a specific value.

The problem you have is different one. You are trying to open a dialog, when another one is already open.
The new dialog is shown, but is lays behind the first one.

You have too hide the first popup, on tap of selectbox, and on "changeSelection" you can show it again.

Here is an example that works:







Am 11.10.2013 um 02:10 schrieb slah:

Hello,
I'm struggling to make SelectBox show option when it's displayed in a popup
window.

Here's an example: http://tinyurl.com/oo2zbgp

when you display the popup and try to select "Language" the list didn't show
options, but when you tap the close popup button then you can see options.

Is it a bug or I'm missing something else?

Regards,



--
View this message in context: http://qooxdoo.678.n2.nabble.com/qx-mobile-enable-to-use-selectBox-inside-popup-window-tp7584753.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&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: qx mobile: enable to use selectBox inside popup window

slah
Hello,
I thought that Dialogs can over lap like in desktop version.
Thank you for the enlightments, much appreciated

czuendorf wrote
To pre-select one option please set the selectedIndex to a specific value.

The problem you have is different one. You are trying to open a dialog, when another one is already open.
The new dialog is shown, but is lays behind the first one.

You have too hide the first popup, on tap of selectbox, and on "changeSelection" you can show it again.

Here is an example that works:

http://tinyurl.com/m8wlgwl






Am 11.10.2013 um 02:10 schrieb slah:

Hello,
I'm struggling to make SelectBox show option when it's displayed in a popup
window.

Here's an example: http://tinyurl.com/oo2zbgp

when you display the popup and try to select "Language" the list didn't show
options, but when you tap the close popup button then you can see options.

Is it a bug or I'm missing something else?

Regards,



--
View this message in context: http://qooxdoo.678.n2.nabble.com/qx-mobile-enable-to-use-selectBox-inside-popup-window-tp7584753.html
Sent from the qooxdoo mailing list archive at Nabble.com<http://Nabble.com>.

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&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: qx mobile: enable to use selectBox inside popup window

slah
BTW, can the array be an array of json objects like in desktop version, and is it possible to setLabelPath as in desktop version too.

Regards
Reply | Threaded
Open this post in threaded view
|

Re: qx mobile: enable to use selectBox inside popup window

czuendorf
I am not sure what you want to pass?

setLabelPath is not available for qx.Mobile.

Greetz Christopher

Am 11.10.2013 um 16:25 schrieb slah:

> BTW, can the array be an array of json objects like in desktop version, and
> is it possible to setLabelPath as in desktop version too.
>
> Regards
>
>
>
> --
> View this message in context: http://qooxdoo.678.n2.nabble.com/qx-mobile-enable-to-use-selectBox-inside-popup-window-tp7584753p7584757.html
> Sent from the qooxdoo mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&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: qx mobile: enable to use selectBox inside popup window

slah
Hello,
suppose I've some data like this:
var data = [{"id" : 1, "label" : "English"}, {"id" : 2, "label" : "Français"}];

how to display "label" in the SelectBox and how to retrieve "id" when an item is selected.

Best regards,
Reply | Threaded
Open this post in threaded view
|

Re: qx mobile: enable to use selectBox inside popup window

czuendorf
Just pass an array with the labels.

then sb.addListener("changeSelection", function(evt){
alert(evt.getData()); // Index
});
________________________________________
Von: slah [[hidden email]]
Gesendet: Freitag, 11. Oktober 2013 19:29
An: [hidden email]
Betreff: Re: [qooxdoo-devel] qx mobile: enable to use selectBox inside  popup   window

Hello,
suppose I've some data like this:
var data = [{"id" : 1, "label" : "English"}, {"id" : 2, "label" :
"Français"}];

how to display "label" in the SelectBox and how to retrieve "id" when an
item is selected.

Best regards,



--
View this message in context: http://qooxdoo.678.n2.nabble.com/qx-mobile-enable-to-use-selectBox-inside-popup-window-tp7584753p7584759.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&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: qx mobile: enable to use selectBox inside popup window

slah
Hello,
the alert(evt.getData().index) returns the index of the item in the array and not the id of the language I'm selecting which I need to insert a new record in the database.

Do I've to create a function that loops into the array of objects to retrieve lang id by label (the evt.getData().item)?

Regards,
Reply | Threaded
Open this post in threaded view
|

Re: qx mobile: enable to use selectBox inside popup window

rsantiagopaz
something like this:

var model = [{"id" : 1, "label" : "English"}, {"id" : 2, "label" : "Français"}];
var labels = [];
for (var x in model) labels.push(model[x].label);

var sel = new qx.ui.mobile.form.SelectBox();
sel.setModel(new qx.data.Array(labels));
sel.addListener("changeSelection", function(e){
    var data = e.getData();
    alert("id: " + model[data.index].id);
}):