0

error: (mojito-dispatcher): Cannot run composite mojit children because there are no children defined in the composite mojit spec.

Hi

I try to run composite mojit example from dashboard tutorial.

I copied&pasted

"application.json",

"mojits/PageLayout/controller.server.js"

and "mojits/PageLayout/views/index.hb.html"

contents and when I open url

http://hereMyIP:8666/@PageLayout/index

I receive

error: (mojito-dispatcher): Cannot run composite mojit children because there are no children defined in the composite mojit spec.

Where or how to spot the cause of this?

Regards

Darek

by
3 Replies
  • if there are no children you should use ac.done() in controller, instead of ac.composite.code or ac.composite.execute()

    0
  • http://developer.yahoo.com/cocktails/mojito/docs/dashboard_tutorial/04_composite_mojits.html

    I did make to the point 6 which states:

    6.Try running app again. It isn’t much but you can at least see the same default content being rendered three times and attached to the page. The next step is to modify our children so that we have more interesting content.

    So, I open url http://hereMyIP:8666/@PageLayout/index and instead of the content I get

    error: (mojito-dispatcher): Cannot run composite mojit children because there are no children defined in the composite mojit spec.

    So I assume - tutorial is wrong or I made mistake - in "application.json" is defined "children" object but composite addon (composite.common.js) reports that there is none, the appliaction.json file is probably parsed and mapped into this.command.instance.config before ac.composite.done() is executed - question is where parsing/mapping is done and why it fails to get config data?

    0
  • It's got something to do with anonymous mojit instance ie @PageLayout - I just defined routing path, excecution action and verb in "routes.json" and page is renedered as expected.

    0

Recent Posts

in Yahoo! Mojito