Parameter | Type | Description |
---|---|---|
app | undefined | dojox/app application instance. |
events | undefined | {event : handler} |
Build the full nested view name from the view and its defaultView(s)
Parameter | Type | Description |
---|---|---|
view | Object | the view with defaultViews to process |
A string with the full nested view names
Bind event on dojo/Evented instance, document, domNode or window. Save event signal in controller instance. If no parameter is provided automatically bind all events registered in controller events property.
Parameter | Type | Description |
---|---|---|
evented | Object | dojo/Evented instance, document, domNode or window |
event | String | event |
handler | Function | event handler |
Bind event on dojo/Evented instance, document, domNode or window. Save event signal in controller instance. If no parameter is provided automatically bind all events registered in controller events property.
Create a view instance if not already loaded by calling createView. This is typically a dojox/app/View.
Parameter | Type | Description |
---|---|---|
parent | Object | parent of the view. |
childId | String | view id need to be loaded. |
subIds | String | sub views' id of this view. |
params | undefined |
If view exist, return the view object. Otherwise, create the view and return a dojo.Deferred instance.
Create a dojox/app/View instance. Can be overridden to create different type of views.
Parameter | Type | Description |
---|---|---|
parent | Object | parent of this view. |
id | String | view id. |
name | String | view name. |
mixin | String | additional property to be mixed into the view (templateString, controller...) |
params | Object | params of this view. |
type | String | the MID of the View. If not provided "dojox/app/View". |
A dojo/Deferred instance which will be resolved when the view will be instantiated.
Response to dojox/app "loadArray" event.
Parameter | Type | Description |
---|---|---|
event | Object | LoadArray event parameter. It should be like this: {"parent":parent, "viewId":viewId, "viewArray":viewArray, "callback":function(){...}} |
A dojo/Deferred object. The return value cannot return directly. If the caller need to use the return value, pass callback function in event parameter and process return value in callback function.
Use trigger() to trigger "loadArray" event, and this function will response the event. For example:
this.trigger("app-load", {"parent":parent, "viewId":viewId, "viewArray":viewArray, "callback":function(){...}});
Load child and sub children views recursively.
Parameter | Type | Description |
---|---|---|
parent | Object | parent of this view. |
childId | String | view id need to be loaded. |
subIds | String | sub views' id of this view. |
params | Object | params of this view. |
loadEvent | Object | the event passed for the load of this view. |
A dojo/Deferred instance which will be resolved when all views loaded.
Response to dojox/app "app-load" event.
Parameter | Type | Description |
---|---|---|
loadEvent | Object | Load event parameter. It should be like this: {"parent":parent, "viewId":viewId, "callback":function(){...}} |
A dojo/Deferred object. The return value cannot return directly. If the caller need to use the return value, pass callback function in event parameter and process return value in callback function.
Use trigger() to trigger "app-load" event, and this function will response the event. For example:
this.trigger("app-load", {"parent":parent, "viewId":viewId, "callback":function(){...}});
Proceed load queue by FIFO by default. If load is in proceeding, add the next load to waiting queue.
Parameter | Type | Description |
---|---|---|
loadEvt | Object | LoadArray event parameter. It should be like this: {"parent":parent, "viewId":viewId, "viewArray":viewArray, "callback":function(){...}} |
remove a binded event signal.
Parameter | Type | Description |
---|---|---|
evented | Object | dojo/Evented instance, document, domNode or window |
event | String | event |
remove a binded event signal.