Page 1 of 3

select menu settings

Posted: Wed Oct 08, 2014 6:06 am
by Asilkhan

Hi
Is it possible to define select menu like on next example: http://api.jquerymobile.com/resources...
If I am populate select menu from collection.


select menu settings

Posted: Wed Oct 08, 2014 7:53 am
by Evgene Karachevtsev

Hello Asilkhan,

To populate select menu from the collection you should create database services. And in the collection check List.
on Success in mapping
form $ please make an arrow to mobileselectmenu_X-0.
from 'your item' make an arrow to label and value

where mobileselectmenu_X is the name of your mobileselectmenu
And on Load event please call list service


select menu settings

Posted: Wed Oct 08, 2014 7:57 am
by Asilkhan

I know how to populate select menu from collection. I want to show on first moment to user "fake" caption(for example "Select you town", "Choose one"), but it caption is not related on collection, it is just informative message. I posted link on 1 post, what I want to see.
http://api.jquerymobile.com/resources...
please check second example from it link.


select menu settings

Posted: Wed Oct 08, 2014 3:09 pm
by Kateryna Grynko

Hi Asilkhan,

Please add a option "Choose one..." in Properties and specify it as Selected.
In Data tab select Events ad run this code on service Success event:presetTimeout(function() {
Appery("mobileselectmenuName").val("");
Appery("mobileselectmenuName").refresh();
}, 10);/preWhere mobileselectmenuName is a Select component name.


select menu settings

Posted: Wed Oct 08, 2014 4:20 pm
by Kateryna Grynko

Hi Asilkhan,

Here is another solution.

On Page show run the following JS code:
pre$('.ui-selectmenu[id*="mobileselectmenuName"]')
.find('.ui-header')
.removeClass('ui-screen-hidden')
.find('.ui-title')
.text('Choose one...');/pre
Where mobileselectmenuName is a Select component name.
Choose one... is a desired caption.


select menu settings

Posted: Thu Oct 09, 2014 3:11 am
by Asilkhan

Both method works wrong.
On first moment user See this one.
Image
When user is going inside select menu, He see "Choose one.." caption in select list and can select it value - it is wrong, because it is not real value.
Image


select menu settings

Posted: Thu Oct 09, 2014 6:10 am
by Evgene Karachevtsev

Hello Asilkhan,

Could you please share your project with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a and tell us its name? (http://devcenter.appery.io/documentat...)


select menu settings

Posted: Fri Oct 10, 2014 4:04 am
by Asilkhan

Hi Evgene
I shared to a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a.
Project name is Turizm Kz


select menu settings

Posted: Fri Oct 10, 2014 9:36 am
by Evgene Karachevtsev

Hello Asilkhan,

On success event please add the execution of the same code.
pre$('.ui-selectmenu[id*="selectMenuStartCity"]')
.find('.ui-header')
.removeClass('ui-screen-hidden')
.find('.ui-title')
.text('Choose one...');/pre
Should work.


select menu settings

Posted: Fri Oct 10, 2014 10:19 am
by Asilkhan

doesn't work