Ellen Schlechter
Posts: 0
Joined: Sun Aug 31, 2014 3:28 am

Refresh just one item?

I have a list on a page. If a I click on an item in that list, I go to a different page where I can delete the item or update it. When I go back to the first page, how can I have it so only the one item refreshes. It makes the app slow to invoke the list service on page show every single time so I am trying to find a faster solution.

Egor Kotov6832188
Posts: 0
Joined: Wed Nov 19, 2014 5:15 pm

Refresh just one item?

Hello Ellen.

To implement this feature you need to use LSV created in Model&Storage, and update LSV, during item's details changing, then on the list page on page show always call mapping with this LSV mapped to the page.

Ellen Schlechter
Posts: 0
Joined: Sun Aug 31, 2014 3:28 am

Refresh just one item?

Sorry I don't really understand what you said.

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Refresh just one item?

Please tell us what exactly is not clear? What you have tried and what does not work?

Ellen Schlechter
Posts: 0
Joined: Sun Aug 31, 2014 3:28 am

Refresh just one item?

I don't really understand any part of it. I want just one item to refresh instead of the list service being fully executed.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Refresh just one item?

Hi Ellen,

There is not ready solution with drag and drop.

Thus only way is to:

  1. use local storage variable/or some storage to store needed information(including _id of editing item).

  2. when come back - you can find needed item by "_id" and update all inside items.

    This is brief plan. Details you should implement by your self.

    Regards.

Ellen Schlechter
Posts: 0
Joined: Sun Aug 31, 2014 3:28 am

Refresh just one item?

Thanks for that. That is currently how I have the update set up. But here is my problem. I have one page where there is a list of items and if you click on an item, it goes to a different page where you can view and edit it. When I go back to the first page, however, the page relists and it scrolls all of the way back up to the top instead of staying in the same spot. This would be fine but when there are hundreds of entries, it is inconvenient to have to scroll through the list again.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Refresh just one item?

Hi Ellen,

If problem only in scroll, you can:

  1. Store current scroll before invoking the service.

  2. Restore current scroll after "complete" event handler.

    Please read more info here: https://api.jquery.com/scrollTop/

    Regards.

Ellen Schlechter
Posts: 0
Joined: Sun Aug 31, 2014 3:28 am

Refresh just one item?

That's a good idea.

How would I store and restore?

Ellen Schlechter
Posts: 0
Joined: Sun Aug 31, 2014 3:28 am

Refresh just one item?

??

Return to “Issues”