Client-side InitController component
The client-side controller provides logic to process the output from a server.
On a client, each controller extends the ScreenController
class
that provides a logic to call InitController
for
a specific screen on a server. The ScreenController
class
initializes the screen and sets the data model that is returned from
the server. For setModel
, a mapping must be provided
in each mashupRef
object in InitController
.
Input from the client to all the mashups under Initcontroller
is
an editor input object that is passed to the client. This input is
available as scControllerInput
request parameter
on the server.
A sample client-side InitController
is as follows:
scDefine(["scbase/loader!dojo/_base/declare", "scbase/loader!dojo/_base/kernel",
"scbase/loader!dojo/text", "scbase/loader!isccs/order/details/OrderSummary",
"scbase/loader!sc/plat/dojo/controller/ScreenController"], function(
_dojodeclare, _dojokernel, _dojotext, _isccsOrderSummary, _scScreenController) {
return _dojodeclare("isccs.order.details.OrderSummaryInitController",
[_scScreenController], {
screenId: 'isccs.order.details.OrderSummary',
childControllers: [{
screenId: 'isccs.order.details.OrderSummaryLines',
controllerId: 'isccs.order.details.OrderSummaryLinesInitController'
}, {
screenId: 'isccs.common.notes.NoteDisplay',
controllerId: 'isccs.common.notes.NoteDisplayInitController'
}, {
screenId: 'isccs.return.search.ReturnListScreen',
controllerId: 'isccs.return.search.ReturnListScreenInitController'
}],
mashupRefs: [{
sourceNamespace: 'getCompleteOrderDetails_output',
mashupRefId: 'getCompleteOrderDetails',
sequence: '',
mashupId: 'orderSummary_getCompleteOrderDetails',
sourceBindingOptions: ''
}, {
sourceNamespace: 'getExceptionList_output',
mashupRefId: 'getExcpetionList',
sequence: '',
mashupId: 'orderSummary_getExceptionList',
sourceBindingOptions: ''
}]
});
});