Page 1 of 1

LIst going to different pages based on db value via storage

Posted: Fri May 27, 2016 10:02 pm
by neuronhighway9522

I have a list on a page that has several items. I have sent all the values to storage before loading them into tabels for the list item specifics. on the page including the name of the page it should navigate next to hidden in a non visible label. There are approximately ten different pages that are locations all are stored in the database and in the request/response parameters..

So how do I:
navigate to a page based on a db value that is in local storage and on the page?

I tried this
var pageLocation = Apperyio.('mobilelabel_pageLocation').val();
navigateTo(value);

invoked on click of the mobilelist item.

sadly that did not work so any ideas?

Then I tried this...if(localStorage.getItem('pageLocation')== Apperyio.('mobilelabel_pageLocation'){Apperyio.navigateTo("value");}
else{
} nope so anybody can help a newbie out?

Thanks!


LIst going to different pages based on db value via storage

Posted: Mon May 30, 2016 5:19 pm
by Serhii Kulibaba

Hello,

Please look ath this master-detail page: https://devcenter.appery.io/documenta...


LIst going to different pages based on db value via storage

Posted: Mon May 30, 2016 6:36 pm
by neuronhighway9522

very helpful!

I am putting the values into storage. Got it!

QUESTION

I have the navigateTo page name in that storage. so how do I write on virtualclick of the list item to navigate to a pageName based on the value I have stored?


LIst going to different pages based on db value via storage

Posted: Mon May 30, 2016 8:44 pm
by Serhii Kulibaba

Please use JS below for that:

prevar pageName = Apperyio.storage.pageName.get();
Apperyio.navigateTo(pageName);/pre

here pageName - name of the Storage variable, which contains the name of the page, needed to open.


LIst going to different pages based on db value via storage

Posted: Mon May 30, 2016 10:06 pm
by neuronhighway9522

Trying to implement but having a bit of trouble... I think the problem is on the element on ... if I am using the virtual click instead of click does that matter?


LIst going to different pages based on db value via storage

Posted: Wed Jun 01, 2016 2:45 pm
by Serhii Kulibaba

You can use any event you want for that. But you have to know virtual click may work a little bit differ http://stackoverflow.com/questions/12...
So it is better to use click or tap events instead of virtual click


LIst going to different pages based on db value via storage

Posted: Thu Aug 04, 2016 5:53 am
by neuronhighway9522

hey if anyone else needs this answer/// heres the code that worked for me...

i passed the two values ( the task id and the page name I wanted it to go to next....)

  1. first mapping the array to storage

  2. then to the list on page via the labels....

  3. you dont need the alert but good to have to check several values in the list to make sure they are actually going to a new page before deleting... also I leave the labels visible until Im sure everything is working and then uncheck the visible settings for the particular label on the UI.....

    Heres the code to use on click of list item//

    Apperyio.storage.task_id.set($(this).find("[name=mobilelabel_assignmentNumber]").text());
    Apperyio.storage.pageLocationPointer.set($(this).find("[name=mobilelabel_pageLocation]").text());
    var storageValue = Apperyio.storage.pageLocationPointer.get();
    alert("storageValue = " + storageValue);
    Apperyio.navigateTo(storageValue);