Page 1 of 2
Empty list command kills list and prevents further actions
Posted: Mon Aug 31, 2015 6:53 pm
by Deon
Hi
I envoke a service to query db and populate a list. Once I select a list item I clear the list with Apperyio("list").empty();
All this works perfectly except it prevents any further events rendered against the list
Eample. I want to envoke the query service again to populate the list with other data The list does not populate. Nothing happens when I envoke the query.
Is there another command to just clear the list and not kill it alltogether?
Empty list command kills list and prevents further actions
Posted: Tue Sep 01, 2015 11:45 am
by Serhii Kulibaba
Hello Deon,
You can save service's response to the storage variable, and use it in other service, which runs if response is not empty
Empty list command kills list and prevents further actions
Posted: Fri Sep 04, 2015 1:08 pm
by Deon
Hi
That is not the point. I know I can do that. I need to populate the list again with the same query.
I need to requery and fill populate my list again but it seems that the empty() killed the list and I can do nothing with it.
Empty list command kills list and prevents further actions
Posted: Wed Sep 16, 2015 11:43 am
by Serhii Kulibaba
Do you need to use infinite list? Please look this tutorial: https://blog.appery.io/2015/07/how-to...
Empty list command kills list and prevents further actions
Posted: Wed Sep 16, 2015 1:20 pm
by Deon
Empty list command kills list and prevents further actions
Posted: Fri Sep 18, 2015 1:01 pm
by Serhii Kulibaba
Could you clarify what have you tried and what exactly does not work?
Empty list command kills list and prevents further actions
Posted: Sat Sep 19, 2015 7:29 am
by Deon
Hi Sergiy
If I empty a list after I have run a query service to populate the list, I cannot re-query to populate the list again.
It seems that Apperyio("list").empty(); actually kills the list component, not just the data, preventing me to fill the list again with a query.
Empty list command kills list and prevents further actions
Posted: Wed Sep 23, 2015 8:53 pm
by Serhii Kulibaba
Do you need keep all items on the screen, but clear their values?
Empty list command kills list and prevents further actions
Posted: Thu Sep 24, 2015 8:09 am
by Deon
Ok let me explain it this way.
What the page looks like
I have a list component on the screen. it is empty. There are no items in the list.
I have an input component on the screen.
3 I have a button on the screen.
My Action**
I type a value into the input component.
2, I press the button
The List displays items based on a query service that is = to the value of the input component.
I select an item from the list and do stuff with the value which is irrelevant to this issue.
On selection of the item, the Apperyio("list").empty();command is fired to clear/empty this list again.
The works fine (only the first time)
The problem
Now I want to start My Action** again
I type a value into the input component.
2, I press the button.
The list does not display any items as it did in step 3 above.
My assumption/conclusion.
Apperyio("list").empty(); kills the list component. No items are displayed because maybe I must not use Apperyio("list").empty();???
My question
Is there any other way or command that I can use to populate the list?
I hope this makes sense.
Empty list command kills list and prevents further actions
Posted: Fri Sep 25, 2015 4:17 pm
by Serhii Kulibaba
You can just hide/show list component with JS:
Apperyio("list").hide();
and
Apperyio("list").show();
*hide after selection and show on button's click event