...
4. The progressState is automatically cleared globally if a Javascript client logic error(event) is fired.
So that in case of an error the window is not blocked in progressState.
...
5. The progressState is also removed automatically when a http request fails
akioma.invokeServerTask in CLAPI:
akioma.invokeServerTask handles the waitCursor by adding two new attributes.
In the case of showWaitCursor active, the uiContext SwatObject will be used for displaying the waitCursor
and the waitState will be applied.
Properties:
uiContext: The dynObject that should display the waitCursor. This object will also be used to find the container(window) and will apply the
waitState on.
showWaitCursor: Boolean for activating or deactivating the waitCursor
See below an example using akioma.swat.invokeServerTask with waitCursor active:
...
Code Block | ||
---|---|---|
| ||
akioma.swat.App.invokeServerTask({ name: 'Osiv.Protokoll.ProtokollBT', methodName: 'ProtokollAusPapierkorb', paramObj: { plcParameter: ProtokollPapierkorbTaskParameter }, showWaitCursor: true, uiContext: CallerWindow.dynObject }).then(function(){ akioma.swat.Message.displayMessageNum ( SmartMessageGroupNameEnum.OSCSYS, SmartMessageNumberEnum.DATENSATZ_ERFOGREICH_GESPEICHERT, { type:SmartMessageTypeEnum.success } ); }); |
Usage from CLAPI:
The WaitCursor can be used from ClientLogic by using the options showWaitCursor when calling akioma.invokeServerTask
or by using the methods defined in akioma.swat.WaitCursor.
akioma.swat.WaitCursor class examples to use from CLAPI:
An example that uses the waitCursor and progressState from ClientLogic is the dossier document viewer code.
In the offer application the waitCursor is handled from CLIENT logic for the Offer new create dialog and for the wPrint dialog.
See below examples for using akioma.swat.WaitCursor class from CLAPI:
* Method used to both show/hide the wait cursor and removing/adding the progress state blocking the user's pointer events in window container
Code Block |
---|
akioma.swat.WaitCursor.hideWaitState(oDocViewer.dynObject); akioma.swat.WaitCursor.showWaitState(oDocViewer.dynObject); |
* Method used to show/hide the wait cursor
...
Code Block |
---|
akioma.swat.WaitCursor.hideWaitCursor(oDocViewer.dynObject); akioma.swat.WaitCursor.showWaitCursor(oDocViewer.dynObject); |
* Method used for removing/adding the progress state blocking the user's pointer events in window container
...
Code Block |
---|
akioma.swat.WaitCursor.showProgressState(oDocViewer.dynObject); akioma.swat.WaitCursor.hideProgressState(oDocViewer.dynObject); |
* Method returning given uiContext dynObject waitCursor visibility
...