Page 2 of 2

Appery and Native Select Menu refresh differences

Posted: Mon Dec 07, 2015 4:40 pm
by Jack Bua

No that is not the issue. The that AFTER a selection is made from the drop down, the select menu's selected item immediately reverts back to the default value, "Select Employee..."


Appery and Native Select Menu refresh differences

Posted: Thu Dec 10, 2015 11:48 am
by Serhii Kulibaba

It is related to the service "mgr_payroll_time_list" which runs on "value change" event of this select component.
That service re-create your select component, so it lost selected value.
You have to set it's value before running mgr_payroll_time_list into storage variable and read that variable on mgr_payroll_time_list's success event as I described you before.


Appery and Native Select Menu refresh differences

Posted: Thu Dec 10, 2015 7:10 pm
by Jack Bua

Mgr_payroll_time_list does not recreate the the select component to the best of my knowledge. It simply populates a list based off of that is in the select component.

Are you saying that a service that has a where query on it from a select menu will reset the selected value of that select menu? That sounds unintentional.

I got the workaround working where I save the selected value to storage on value change then after the list-populating success triggers, I map the LSV back to the select menu.

Is this a bug?


Appery and Native Select Menu refresh differences

Posted: Fri Dec 11, 2015 3:56 pm
by Serhii Kulibaba

I reviewed your app again. The reason of such behavior is:
You run the service "mgr_payroll_user" on the page show event, which is always triggered after closing a dialog of the emp_select. This service rewrites your select component: http://prntscr.com/9cyaz5
So you lose it's value.

If you use Native Menu - it doesn't open dialog, so "page show" event isn't triggered and as a result - service mgr_payroll_user isn't called and you don't lose emp_select's value.


Appery and Native Select Menu refresh differences

Posted: Fri Dec 11, 2015 5:42 pm
by Jack Bua

You nailed it! Issue is now resolved, and I learned something very valuable.

Thank you for all of the time you put into this.