Eddie Willcox
Posts: 0
Joined: Thu Nov 14, 2013 6:55 am

Retrieve data using clickable list

Hi,

I have read the tutorial on building a clickable list with html5 localstorage, but this is not exactly what I'm looking. I am extremely new to this and I need a lot of help.

Basically what I have done so far is to create a page with collapsible sets. Under each collapsible header I have lists with static values (I might to change this). What I want is to be able to click/tap on the list and this must then navigate to another page and only show me the data that is associated with the parent page list header. The data has 2 columns it must select from to show the data on the item_info page. The columns are called segment_1 and segment_3.

For instance, on the parent page (the one with the collapsible sets and lists) I will have a a collapsible block with heading CD and below that a list with heading Alternative. When I click/tap, it must navigate to the item info page, but only show me data that is relevant to CDAlternative. Thus it must select from the data only those items with segment_1 values "CD" and segment_3 values "AL" and then display the information I want it to display.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Retrieve data using clickable list

Dear Eddie,

On item click, you can save its text or anything else, adding an appropriate handler for Click event on Events panel.

Eddie Willcox
Posts: 0
Joined: Thu Nov 14, 2013 6:55 am

Retrieve data using clickable list

Hi Katya,

Ok, that sounds easy enough, but when I have set the text property to what I want it to be, how do I then use this property to load the info on the next page?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Retrieve data using clickable list

Eddie,

I recommend you this pretty simple tutorial that shows how to work with localStorage: http://docs.appery.io/tutorials/build...

Eddie Willcox
Posts: 0
Joined: Thu Nov 14, 2013 6:55 am

Retrieve data using clickable list

Thanks Katya. I will go through it. If I have more queries I will let you know.

Eddie Willcox
Posts: 0
Joined: Thu Nov 14, 2013 6:55 am

Retrieve data using clickable list

Hi,

I tried replicating the tutorial in my scenario, but when loading the next page, it times out and does not display anything.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Retrieve data using clickable list

Hello! Please check are there any errors in console?

Eddie Willcox
Posts: 0
Joined: Thu Nov 14, 2013 6:55 am

Retrieve data using clickable list

There are no errors, but I do see a warning: event.returnValue is deprecated. Please use the standard event.preventDefault() instead.

it's not timing out at the moment, but it's not displaying what I expect it to display

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Retrieve data using clickable list

Could describe in more details what have you done? Screenshots would help.

Eddie Willcox
Posts: 0
Joined: Thu Nov 14, 2013 6:55 am

Retrieve data using clickable list

Here is what i have done:

  1. Created a page with collapsible sets
  2. Added lists under the sets
  3. Created tap events on the list items to set local storage variable segment_1 to CD (will have to do this on all the list items setting segment_1 to whatever it must be), set another local storage variable segment_3 to whatever segment_3 must be to show the correct data and then navigate to a page Image
  4. On the second page, i have 2 hidden labels (segment_1, segment_3). On page load, i set the labels property to read from their respective local storage variables then invoke my listing service to list the items: Image
  5. the data listing service request tab: Image
  6. the response: Image

Return to “Issues”