question about mobile, dialog widget and routing

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

question about mobile, dialog widget and routing

rsantiagopaz
Hi (sorry the english!)

I was working in my apps with mobile and using all the concepts of skeleton demos, codes, examples, from qooxdoo site. Master/Detail, pages, forms, all work very well.
I do not know, or do not understand, all the whole Routing concept, only the basic idea. But I copy the qooxdoo examples, and all work fine.
Now I need add some mobile dialog widgets. And when a modal dialog appear, I need hide the dialog using the hardware back button from cell/tablets. But when I press the back button, the dialog dissapear but the page flip back too (With mobile selectbox's popup occurs something similar). Only the dialog must hide, not page flip back. I was hard trying modify this behavior, but I cant figure how.

How should I use the dialog widget (modal or not) and routing manager together? Is possible? With some little example or text about or link about I will can understand.

...With this little behavior my mobile apps will be professional mobile apps.
thanks
Reply | Threaded
Open this post in threaded view
|

Re: question about mobile, dialog widget and routing

kreimer
Hi!

take a look at line 77 of:

https://github.com/qooxdoo/qooxdoo/blob/master/application/mobileshowcase/source/class/mobileshowcase/page/Overview.js

every time you execute a menuItem in the mobile showcase, you show a page, via the routing configuration in:

https://github.com/qooxdoo/qooxdoo/blob/master/application/mobileshowcase/source/class/mobileshowcase/Application.js

you can add a route and onGet you can open the dialog with:

when you need to show the dialog you call

qx.core.Init.getApplication().getRouting().executeGet("/mydialog");

This way you end up with a change in the app uri and therefore the history, and the back button will respond as you need.

It's all guessing, I did not tried this by myself.

Could you tell me if that works for you?



Reply | Threaded
Open this post in threaded view
|

Re: question about mobile, dialog widget and routing

rsantiagopaz
hi kreimen, thanks for you time.


well, yes, works.. but.. this is fine? That is my problem, the doubt.
I imagine something wrong. If the mobileshowcase dont have this behavior, something must be wrong!
thank you very much
Reply | Threaded
Open this post in threaded view
|

Re: question about mobile, dialog widget and routing

kreimer
Well, I guess we both speak spanish.. but let's respect the lingua franca...
Mmm, yes, I share the same hesitations...
In fact, running the mobile showcase.. you can see the same '''''bug'''' (I think it's not really a bug).
As an application designer, you have the choice of making this particular dialog part of the application history.
I mean that's exactly what 'history' means (and the back button ideology).
I prefer to think it's a matter of what is useful for your app.
I really don't know if there is a better/cleaner way to achieve this from the framework.

Regards and good hacking!