mojito
mojito copied to clipboard
Error : During Dynamic mojit creation
HI, I just trying out few tutorials in the mojito, and got stuckup in the dynamic mojit creation. whether we include a grand child in the dynamic mojit at controller file. I do not know this is a issue or i didnt understand concept.. ,, need a help in this : this is my controller index action :
index: function(ac) {
ac.models.get('model').getData(function(err, data) {
var cfg = { view: "index",
children: {
frame: {
type: "frame",
action: "index",
config: {
children: {
body:
{
type:"Body",
action:"index"
},
footer: { type: "footer", action: "index" }
}
}
}
}
};
ac.composite.execute(cfg,function(data, meta){
ac.done(data, meta);
});
Error which i get is :
Error dispatching '@header': TypeError: Cannot call method 'get' of undefined at Object.Y.namespace.index (/home/local/PAYODA/madhankumar.p/dynamic/mojits/header/controller.server.js:25:23) at Object.ActionContext (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/autoload/action-context.common.js:364:35) at Object.Y.namespace.Dispatcher._createActionContext (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/autoload/dispatch.server.js:67:22) at /home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/autoload/dispatch.server.js:163:28 at ResourceStore.Y.extend.expandInstanceForEnv (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/autoload/store.server.js:613:13) at ResourceStore.Y.extend.expandInstance (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/autoload/store.server.js:547:18) at Object.Y.namespace.Dispatcher.dispatch (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/autoload/dispatch.server.js:135:19) at Object.ActionContext._dispatch as dispatch at Object.Addon.addChild (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/addons/ac/composite.common.js:341:18) at Object.Addon.execute (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/addons/ac/composite.common.js:195:44) error: (mojito-output-buffer): Error executing: 'mojito-composite-addon::@undefined:index': error: (mojito-output-buffer): Cannot call method 'get' of undefined error: (mojito-output-buffer):
TypeError: Cannot call method 'get' of undefined at Object.Y.namespace.index (/home/local/PAYODA/madhankumar.p/dynamic/mojits/header/controller.server.js:25:23) at Object.ActionContext (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/autoload/action-context.common.js:364:35) at Object.Y.namespace.Dispatcher._createActionContext (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/autoload/dispatch.server.js:67:22) at /home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/autoload/dispatch.server.js:163:28 at ResourceStore.Y.extend.expandInstanceForEnv (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/autoload/store.server.js:613:13) at ResourceStore.Y.extend.expandInstance (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/autoload/store.server.js:547:18) at Object.Y.namespace.Dispatcher.dispatch (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/autoload/dispatch.server.js:135:19) at Object.ActionContext._dispatch as dispatch at Object.Addon.addChild (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/addons/ac/composite.common.js:341:18) at Object.Addon.execute (/home/local/PAYODA/madhankumar.p/dynamic/node_modules/mojito/lib/app/addons/ac/composite.common.js:195:44)
Hello, the error is occurring at "dynamic/mojits/header/controller.server.js:25:23". Looks like its calling a method 'get' on an object that is undefined. I can't tell what is going on without seeing the header mojit controller; but perhaps a module that that controller is expecting was not properly loaded. There might be some YUI "module not loaded" messages on your console.