how to create transition from one page to another - e.g. with your test todo app you see a list of tasks. I would like to show details of this task on the next page - by clicking on the task name. How should i do this?
how to create transition from one page to another - e.g. with your test todo app you see a list of tasks. I would like to show details of this task on the next page - by clicking on the task name. How should i do this?
Hi Ilya,
On List item Click event, you can add an appropriate handlers on Events panel. You can use localStorage to save current item data and Navigate to page action.
Katya, thank you.
What I did: set local variable with "Variable name: task, Value: "
and then added "Navigate to page" and specified the page.
This didn't help - the other page just displays default content.
Maybe I should add local variable to the other page on the page load event too?
Ilya,
On second page, add 'Set property' action on Page show event. There specify 'Read from local storage variable' and needed variable value.
Katya, thank you.
But if I specify as component name - Screen, then I cannot continue. Does this mean that I should link the local storage value to particular screen element? If yes - then what element should i use?
--
Katya, I got it myself ![]()
--
Could you please help me with another thing - what is the right way to display specific to this "task" data?
So: I have task, then I want to display when, say, it was created - how should i do this? Should I use service 'read service' on that page? If yes then - what should i use as a variable for it? i mean that i can use id (but where should i get it from?) - or should i use the local variable? If yes - then there could be the case when is not unique?
Hi Ilya,
As you can see here http://docs.appery.io/tutorials/build... id for each record is stored in Database column '_id'. You can use this value. A date creation and task itself can be displayed simultaneously (on any event invoke service).
Katya, i see.
But if I want to show on the page information related to the local storage variable. So that I transitioned to task details page and then would like to see additional info on this task. How would i do this?
In other words - should i use as a local storage variable item id, but not text?
Ilya,
Yes, you can use a local variable 'id' on 'details' page to send a request to Database and receive a detail information.