I want the loader in Progress bar format if it is for client action i can update value for the number of time i need like 20%,50%,75%,80% etc..., but if am calling a single server action which is calling multiple server action in that i need to notify the user how much completed like that how can i do this?
How to calculate that?
Hi sasikumar S,
What you can do is divide that one server action into multiple ones, each one will trigger an event when finished, the progress bar gets updated and the next server action is called. Like a step-by-step process where each step corresponds to a server action.
Just an idea.
Regards,
PZ
Hi paulo,
Thanks for replying
Splitting server into may will cause to multiple server hit also will cause architecture issue am i right?
Hi sasikumar,
Yes, it will have more server calls, but you don't need to have dozens of them. It was just an idea to divide your main server action into multiple ones, let's say 4, each one corresponding to 25% of the progress, for instance.
In terms of architecture, I don't see any issues.
Although it is recommended to minimize server calls when possible as a best practice, the number of these does not constitute an architecture issue.
Hello,
I don't understand how we can progress the loader, which is on client Side.
Because when you click on the screen action it will trigger the server action,
And once you get into a server action everything becomes synchronous, and how you are going to manage the output, which says 10 percent completed then 20 and so on.
let me make it more detailed.
So you perform an action which is executing multiple server action, now you want to show the progress on a loader or a progress bar.
This can be a workaround I can say which you can do.
You need to create a temp entity which will hold the percentage of completion,
This is one way. Other way is using realtime data base or web sokets.
ThanksTousif Khan