Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Select option not getting populated with json response after Appery builder upgrade

Hi Yaniv - Unfortunately nothing yet, we'll let you know.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Select option not getting populated with json response after Appery builder upgrade

Hi Yaniv,

Sorry for this delay.

Tried your app and could not understand what is wrong in this implementation.

Please take a look on the screen shot: http://prntscr.com/69jaya/direct

Could you please describe in step-by-step how it works and how it should work?

Thanks.

Yaniv
Posts: 0
Joined: Wed Jun 12, 2013 8:38 pm

Select option not getting populated with json response after Appery builder upgrade

Hi,
Here are the steps in this page:
On Page load invoke JS that doing the following:

  1. Calling getPlace service in order to retrieve the 1st select

  2. Calling getDishTypes service in order to retrieve the 2nd select
    Note: they are not depending one on the other

    -- Expected result: both selects populated with values while the 1st selected
    -- Actual: both selects populated but the 1st value not getting selected.

    While changing the 1st select I invoke JS to clean all fields, also the 2dn select - to select the 1st in the list (this is why you see that the 2nd select populated with the selected value).

    Keep in mind the the 1st issue is the root cause for all (I assume that while this will be fixed it will solve also the issue while 2 selects depends one on the other)

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Select option not getting populated with json response after Appery builder upgrade

Hi Yanive,

Here is a solution:

  1. to getDishTypes "success" event add following JS code:

    pre

    Apperyio("DishPlaceList").val("default").trigger("change")

    /pre

  2. to getDishTypes "success" event add following JS code:

    pre

    Apperyio("DishDetailsTypeList").val("default").trigger("change")

    /pre

    Please check you app.

    Regards

Yaniv
Posts: 0
Joined: Wed Jun 12, 2013 8:38 pm

Select option not getting populated with json response after Appery builder upgrade

Thanks Yurii,
I notice that the use of Apperyio("DishPlaceList").val("default").trigger("change") trigger additional call "value change" event.

In order to avoid it I used the following code on service success:
$("#CreateNewDish_DishPlaceList option:first").attr('selected','selected');

So in the new Appery builder we will need to use this code for any select that its data come from back-end service?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Select option not getting populated with json response after Appery builder upgrade

Hi Yaniv,

I tried on new app and can not reproduce this problem.

Please try following:

  1. Add new select.

  2. Add new list datasource.

  3. Make mapping to list items without "selected" property
    Details: http://prntscr.com/6bn6tn/direct

    Regards.

Return to “Issues”