This component suits as a wait screen, which let the user to execute a blocking background task (e.g. a network communication) and waits for it until finished.
The background task is being started immediately prior the component is being shown on the screen.
When the background task is finished, this component calls commandAction method on assigned CommandListener object. In the case of success, the commandAction method is called with SUCCESS_COMMAND as parameter, in the case of failure, the commandAction method is called with FAILURE_COMMAND as parameter.
The functionality from previous version, where the component automatically swiches to another
Displayable
objects is still available, but has beeen deprecated.
The deprecated behavior is the following - in the case of success (i.e. the task finished successfully), it switches to displayable(s) supplied by
setNextDisplayable()
methods, in the case of failure, it switched to displaybles(s) supplied by
setFailureDisplayable()
methods. In the case there is not set failure displayable,
WaitScreen
even in the case of failure switches to displayables specified by the
setNextDisplayable()
method. In the case there is even no next displayable specified, after the task is finished,
WaitScreen
switches back to the screen it was previously visible on the display.
@author breh