Skip to main content


 

Symptoms


You may see the cases when there are no spinners being displayed on nested views (i.e. on views which are placed on form) - there is only form spinner which disappears before nested views finish their load.
 

Diagnoses


The visibility and behavior of spinners depends on rules/execution mode configuration for form/views.

In order to get individual spinners on all nested views it is necessary to configure form rule as follows:

"When the Form is Initialized" "then start the following asynchronously" (inside of this block you may have "on View, execute the Initialize method")

In case we want to get single form spinner which persists till all the nested views completely loaded:

"When the Form is Initializing" "then complete the following concurrently" (inside of this block you may have "on View, execute the Initialize method")

In order to get spinners to work properly in batch execution mode ("then complete the following in a batch") you have to move execution of a view actions/methods on a form level, i.e. you cannot use batch block "on View, execute the Initialize method", but instead should use "on View, execute the List method" - this will allow you to have both individual spinners (with use of "When the Form is Initialized") for all nested views and single form spinner (with use of "When the Form is Initializing") which persist until all views finish loading.

Note on the execution types:

Different execution types only make a difference for when server calls are being made. There will be no difference in actions like transfer data/setting control properties, opening/closing sub-forms, hiding/showing controls etc.

1. Concurrent or Asynchronous execution will be in general faster than the Batch or Synchronous execution.
a. The performance difference is negligible between Concurrent and Asynchronous.
b. If Asynchronous is used then "user's perceived" performance can be improved over Concurrent due to the individual spinners on controls / views.
c. Asynchronous execution currently does not show view spinners when used on Form level for view’s initializing methods with sub actions on initialize
d. If this view spinner behavior is required the actions can be added to the Form Initialized event instead.
2. You should use Concurrent or Asynchronous in both view and form instead of Batch for the purpose of re-use.
(Batch execution does not work as expected for rules that have sub rules for example the Batch execution of view initializing rules on form level)
3. The Batch execution can described as
a. Synchronous for correctly batched server calls
i. This requires that the methods in the batch do not have sub actions
ii. The calls are grouped together send to server where they are executed one after another.
iii. The results of each call are combined and returned as a set of results
b. Asynchronous if the above is not the case

Spinner delay

The spinner delay is a time to wait before showing the Form initializing spinner. This works well for:
Small amounts of data are loaded in the Form initialize rule (e.g. item views)
The Form normally takes a really short time to load
There is a possibility a server call may be delayed

This does not work well for:
Large amounts of data are loaded (list views/editable list views)
The form normally takes a long time to load

Once a large amount of data is returned from a server call there is no way to interrupt the single threaded JavaScript processing to actually show the spinner.
 

Resolution

See Diagnosis section for detailed explanations on spinners behavior and execution types, as well as recommended configuration which allows to have spinners on nested views.




 
Be the first to reply!

Reply