Page 1 of 1

Long question

Posted: Thu Dec 17, 2015 3:20 pm
by Nicklas

This will be a long question but i will try to explain it as best as i can.

First of all. I have a service that lists up all the users i have in my database.
In my app, I have invoked the service like this:

Image

So when i use this one (the picture bellow) it creates a new "listitem" for every user I have in the database:

Image

What i want to do:

When i click on each listitem, with the different users from my database, I want a page to open up, that shows some info I have on the user (listitem) I click on.

I have tried to show the user-id for each user and write the id to Local-storage when click the listitem, but that doesnt work.
Image

Can anyone give me an idea of how I can solve this or give me a link to read how to do this? (If you understood what I ment :P )


Long question

Posted: Thu Dec 17, 2015 3:27 pm
by TonyS

So you passed the ID by first saving it to local storage then using it to filter the service?

So on your detail page you map the locally stored ID to the appropriate field in you db/service?

And it doesn't work?

I do the same thing and it works fine.

I do find the mapping thing very confusing at times, far to complicated:)

Just check that the ID is mapped at the before stage the page components are mapped at the success stage.


Long question

Posted: Thu Dec 17, 2015 3:49 pm
by Nicklas

Hmmm... I think im starting from scratch and try it again then. Thank you for the answere!


Long question

Posted: Thu Dec 17, 2015 3:53 pm
by Nicklas

I see now that you maybe misunderstood your first question there. The "listitems" is on the page already when I open the page. So in other words i Invoke the list_service with "load page".


Long question

Posted: Thu Dec 17, 2015 4:00 pm
by TonyS

Yeah, I do it with 2 pages, the old master detail page routine:)


Long question

Posted: Thu Dec 17, 2015 6:34 pm
by Serhii Kulibaba

Hello Nicklas,

Please look at this tutorial: https://devcenter.appery.io/documenta...


Long question

Posted: Thu Dec 17, 2015 6:52 pm
by Nicklas

Perfect Sergiy! Thank you! I will try this! :)


Long question

Posted: Thu Dec 17, 2015 7:44 pm
by Nicklas

This worked exactly like i wanted it! Thank you!