I would like to know whether there is an option vision to display 'loading' like toastr whenever we click on search/load button.
I have tried using a label to make it appear for few seconds but i would like to explore toastr kinda thing.
The only "off the shelf" component to display a "loading" message is the progress bar, set to "indeterminate". If you don't want to use that, you could set up a label or image component with a loading GIF or whatever else you want.
Then the trick becomes safely using a background thread to perform any long-running calculation without any risk of deadlocking the UI.
I would start by reading up on Swing's "Event Dispatch Thread", both externally and on this forum.
The general pattern for a complex operation like this is:
Do it all through scripting, so you have control over order of operations and flow.
At the beginning of your script, while you're still on the EDT, show your "loading" indicator.
Launch an asynchronous script (system.util.invokeAsynchronous) so you're moved off the EDT.
Every time you want to indicate progress, including the final completion, move back to the EDT by calling system.util.invokeLater from your async thread.
What is loading, a dataset(s)? I use something like this (only works because I know each dataset MUST have more than one row) to let me know when some data is loading for a window
as an expression. Then bind this to some visibility of a loading image/gif or progress bar or whatever you are trying to show while things load.
Alternatively if its a table, there is a .propertiesLoading, that is helpful as well. I've used that before to turn on a "Loading..." image based on if it is true or false.
Running status of timer has been binded to a vision client tag.
So whenever u hit on load button , this symbol will be displayed by enabling the vision tag,
But this symbol should go off only when after the data to table has been loaded.
I have tried the same functionality with a label , but it is not displaying as expected, even tried the same with indeterminate progress bar.
Any ideas to achieve this
Yea I would not do it like this. It looks like you are just supplying components from your filters to the parameters of a named query - which is a good start.
However, then you are just assigning it to a table data property.
Why not
Bind your table data property to your named query and bind the parameters to your various component values? Then you won't have to manually script this (and imo it is better to bind over script where possible and this is certainly one of those times).
Your table should have a .propertiesLoading property. Bind your loading GIF visibility to property to Root Container.table.propertiesLoading or whatever the path may be - therefore if your data is in the process of being built, your loading symbol appears.
You can also bind your table visibility to !{Root Container.table.propertiesLoading} if you want - therefore only either your loading GIF or your table will be viewable, but not both at the same time.