Interface ICrossViewScopeResponseSupplier<T extends Serializable>
- Type Parameters:
T
- Type of the requested data.
- All Superinterfaces:
Serializable
Creates the response to a cross scope request. This supplier is called within the view scope of the target.
- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
-
Method Details
-
computeRequestedData
- Parameters:
params
- Parameters for computing the requested data. When agetClientDataProvider()
was specified, the data returned by the callback can be accessed viaIComputeRequestedDataParams.getClientData()
.- Returns:
- The result that should be returned in response to the request.
- Throws:
Exception
- When the result could not be created.
-
getClientDataProvider
- Returns:
- Optional callback on the client (browser). Must be a JavaScript expression that evaluates to a function.
When given, this callback is invoked on the client without arguments in the view scope of the request target.
The callback may return a JSON object (or a Promise for a JSON object), which can then be accessed in
computeRequestedData(IComputeRequestedDataParams)
viaIComputeRequestedDataParams.getClientData()
. This lets you send data to the client and/or retrieve data from the client if necessary.
-