A
Callback
is an arbitrary action to be fired - usually passed into a method to be fired asynchronously as
a notificaction of some event.
The
callback
can be defined in the following formats:
- a
function
- A string containing an expression to evaluate
- An object with the following properties:
- target: fire in the scope of this target - when the action fires, the target will be available as
this
.
- methodName: if specified we'll check for a method on the target object with this
name.
Callbacks
are fired via the Class.fireCallback method, which allows named parameters
to be passed into the callback at runtime. If the Callback was specified as a string of script, these parameters are
available as local variables at eval time.
For specific Smart GWT methods that make use of
Callback
objects, see local documentation for information on parameters and scope.