0

Manipulating data from a sqlite database without using an onclick action

Franch 11 lat temu Ostatnio zmodyfikowane przez icahill (Administrator) 11 lat temu 7
I have a pager/list that appears to function correctly and each class in that list has an action it calls on click that visualizes the data on a different panel.

So the app displays a pager with names on it, and if you click one of the names, another panel takes over the screen displaying all the other details associated with that name in my sqlite database.

My problem is that I need a way to move from that secondary detail panel directly to the secondary detail panel for the next name on the list. I am not really sure how to go about doing this.

I have been trying to give each class in the list an alias but when I try to access its data all of the values that I hoped would be populated by the list from the sql database are nil. I have also tried using that alias with a play function to call the action associated with the onclick value but that is also not working for me.

Any help would be appreciated. Thanks for your time!
If you want to make your secondary detail panel a list that has paginate enabled, wouldn't that achieve the effect you are looking for?

Then you can use the action that launches the secondary panel to scroll to the item page that one selects from the list and it will then be swipeable left and right to the rest of the data set. 

You could even add arrow icons that can scroll next and back to get it the illusion that it is not a scrolling list. 


I'm not sure I fully understand. Would I have two different lists referencing the same sql table in this case? The two lists would just be different ways of visualizing the info, right? So the click action on the first list panel would change to a scroll to action on the secondary list (and also pull that panel up in front)?

Is that what you are trying to suggest?
Yes. You would still use an onclickup to launch the details modal, but also a scroll action to move the secondary pager (list) to the correct spot. 

I visualize it as leaving a single panel up and scrolling through new data "cards". Rather than closing a panel and reopening a new one every time. Unless of course the user closes it and scrolls through the name list and selects a new name to launch details for. 
Also this may complicate things but the secondary information is dynamic. So you should be able to change values there and then scroll to the next one, scroll back later and see the most recent changes.

What I have now is that there are variables for all of the values that can change and whenever the user edits a value the display is altered and that variable. Then when the user moves to the next "card" those variables are saved in the sql table and then reset to the values from the next "card" pulled from the sql table. So there is only one set of variables at a time and they are only used to commit changes to the sql table.

Is there a way to set each card to display the values from the sql database but only populate the variables for whichever card currently has focus?

Thanks for the help.
I am trying to implement this and right now I don't have any scroll actions implemented, just the secondary list and loading the secondary data for a single name when it is clicked. When I do click it it opens the secondary list, but every entry is empty except the final (right most) entry which has the correct values of the name I clicked.

Any idea why it only loads the data into the end of the list?
Also this may complicate things but the secondary information is dynamic. So you should be able to change values there and then scroll to the next one, scroll back later and see the most recent changes.
Can you go ahead and email me your app id so I can take a look at what you have so far. (community@rarewire.com)