Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


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.

 



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.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
titleakioma.invokeServerTask example:
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

Code Block
akioma.swat.WaitCursor.isCursorVisible(uiContext);

 

 


* Method used for checking if progress state is active

Code Block
akioma.swat.WaitCursor.isProgressStateActive(uiContext);





akioma.WaitCursor

 It is a static class, used for waitCursor and progressState functionality. The class provides methods like showWaitCursor, hideWaitCursor, showProgressState, hideProgressState, setProgressStateForLinks, createLogger and others.

...

showProgressState() - method for showing the progressState which will block the user from clicking on buttons inside the window/container object and show/hide blur depending on the debugMode property.

 

Example of programatically calling the showWaitCursor:

Code Block
    akioma.WaitCursor.showWaitCursor(oSelf.dynObject);

 

Showing an businessEntity Showing the waitCursor on a businessEntity uiContext will automatically show the waitCursor for that businessEntity and his its linked targets. Example:


 

On every fetch, the waitCursor and the progressState are triggered. Example with debugMode on :