on ‎2020 Feb 04 2:16 AM
Hello CCO devs!
We have a long running operation running in the background that should block the new CCO UI until it times out or returns.
Is there any way to display the native "wait circle" in the UI (maybe with a wait message?) to the cashier so he knows to wait for something?
Thanks and best regards,
Joerg.
Request clarification before answering.
Hi joerg.ceo ,
you mean the wait circle for the cashier, right?
You are aware how to push events to the UI eventbus?
There are 4 events you can use:
"GLOBAL_LOADING_INDICATOR_SHOW",
"SHOW_GLOBAL_LOADING_INDICATOR",
and
"CENTER_LOADING_INDICATOR_HIDE",
"HIDE_CENTER_LOADING_INDICATOR".
Have a look at my answers here:
To get an idea how you can push messages to the ui eventbus in the ui itself.
It should look like something like this:
this.eventBus.push('GLOBAL_LOADING_INDICATOR_SHOW', "My custom message");To push from your plugin backend maybe this will help.
So something like that:
JSONObject oJSONEventPayload = new JSONObject();
oJSONEventPayload.put("message", "my custom message");
UIEventDispatcher.INSTANCE.dispatchAction("GLOBAL_LOADING_INDICATOR_SHOW", null,
oJSONEventPayload);
Never tested it though, let's us know if this works. 😉
Edit: shorter version for pushing event from backend.
Edit2: Changed Eventbus push.
Regards
Robert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That worked perfectly, just a slight modification:
this.ccoEventBus.push('GLOBAL_LOADING_INDICATOR_SHOW', "My custom message" );Thank you Robert!
Joerg.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.