Ajax refreshing multiple list items without refreshing whole list

Hello

I'm currently implementing a solution using this forge component:

https://www.outsystems.com/forge/component-overview/3960/hierarchical-tree

- I've got a list of items, which operates with a hierarchy structure, as in the above component.

- I'm trying to optimise the actions, as on our large dataset, opening a parent item causes a serious delay     on the ajax refresh.

- I therefore attempted to use the "row number" property on the ajax refresh, to only refresh the changing the necessary rows. I did this in a loop as shown below.


- While a little quicker, this method is still pretty slow, and the items appear one by one on my screen.

Is there any method for ajax refreshing multiple row items quickly? Perhaps a javascript solution to this?

Thanks!

Hi,

Why do not you make all your changes and at the end of ajax refresh?

Bernardo Condé wrote:

Hi,

Why do not you make all your changes and at the end of ajax refresh?

Basically the whole list is very long, so ajax refreshing the whole thing takes quite a long time


Joseph Palmer wrote:

Bernardo Condé wrote:

Hi,

Why do not you make all your changes and at the end of ajax refresh?

Basically the whole list is very long, so ajax refreshing the whole thing takes quite a long time


I understood, it's because you go through a list, and with each record you give an ajax on the screen, it does not look cool. Did you run something on your screen, which automatically updates it in x time, would it help you?


If it helps you, you can put at the end of your logic a RunJavaScrip with the following code: "setInterval (function () {document.getElementById ('" + link.Id + "') .click ();}) ; " and on your screen, you have a link with the name that will be called in that function for the click and in the logic of it, the ajax you want. You set the time, and it will update automatically.

Bernardo Condé wrote:

Joseph Palmer wrote:

Bernardo Condé wrote:

Hi,

Why do not you make all your changes and at the end of ajax refresh?

Basically the whole list is very long, so ajax refreshing the whole thing takes quite a long time


I understood, it's because you go through a list, and with each record you give an ajax on the screen, it does not look cool. Did you run something on your screen, which automatically updates it in x time, would it help you?


Right ok. You mean like an interval that refreshes the list afterwards?


Joseph Palmer wrote:

Bernardo Condé wrote:

Joseph Palmer wrote:

Bernardo Condé wrote:

Hi,

Why do not you make all your changes and at the end of ajax refresh?

Basically the whole list is very long, so ajax refreshing the whole thing takes quite a long time


I understood, it's because you go through a list, and with each record you give an ajax on the screen, it does not look cool. Did you run something on your screen, which automatically updates it in x time, would it help you?


Right ok. You mean like an interval that refreshes the list afterwards?


Yes,

If it helps you, you can put at the end of your logic a RunJavaScrip with the following code: "setInterval (function () {document.getElementById ('" + link.Id + "') .click ();}) ; " and on your screen, you have a link with the name that will be called in that function for the click and in the logic of it, the ajax you want. You set the time, and it will update automatically.


Bernardo Condé wrote:

Joseph Palmer wrote:

Bernardo Condé wrote:

Joseph Palmer wrote:

Bernardo Condé wrote:

Hi,

Why do not you make all your changes and at the end of ajax refresh?

Basically the whole list is very long, so ajax refreshing the whole thing takes quite a long time


I understood, it's because you go through a list, and with each record you give an ajax on the screen, it does not look cool. Did you run something on your screen, which automatically updates it in x time, would it help you?


Right ok. You mean like an interval that refreshes the list afterwards?


Yes,

If it helps you, you can put at the end of your logic a RunJavaScrip with the following code: "setInterval (function () {document.getElementById ('" + link.Id + "') .click ();}) ; " and on your screen, you have a link with the name that will be called in that function for the click and in the logic of it, the ajax you want. You set the time, and it will update automatically.


Yes so I would do this if the action was taking too long, but in this instance, the problem is simply that the ajax refresh itself is taking too long. 

This would not resolve that, i dont think will it?


Joseph Palmer wrote:

Bernardo Condé wrote:

Joseph Palmer wrote:

Bernardo Condé wrote:

Joseph Palmer wrote:

Bernardo Condé wrote:

Hi,

Why do not you make all your changes and at the end of ajax refresh?

Basically the whole list is very long, so ajax refreshing the whole thing takes quite a long time


I understood, it's because you go through a list, and with each record you give an ajax on the screen, it does not look cool. Did you run something on your screen, which automatically updates it in x time, would it help you?


Right ok. You mean like an interval that refreshes the list afterwards?


Yes,

If it helps you, you can put at the end of your logic a RunJavaScrip with the following code: "setInterval (function () {document.getElementById ('" + link.Id + "') .click ();}) ; " and on your screen, you have a link with the name that will be called in that function for the click and in the logic of it, the ajax you want. You set the time, and it will update automatically.


Yes so I would do this if the action was taking too long, but in this instance, the problem is simply that the ajax refresh itself is taking too long. 

This would not resolve that, i dont think will it?


I understand, it's more complicated then, it might work out or not. But it may be that with javascript running from time to time, you can see a better result automatically. I do not know if it will help you, because the whole problem is the ajax slowness, and you need it.


What if instead of doing with Ajax Refresh you do with Submit? The screen will "blink", however the whole screen will update and you will not need the ajax. I do not know if it's good for you.


Bernardo Condé wrote:

What if instead of doing with Ajax Refresh you do with Submit? The screen will "blink", however the whole screen will update and you will not need the ajax. I do not know if it's good for you.


Unfortunately i cant do that, as i dont want the whole list to refresh, just a few specific rows. :/


In an ideal world I think that what we would like is the ajax refresh "row number" element to be able to take a list of row numbers. Is it possible to do something like this?