I'm confused how to access Model's data from a View with a YUI component.What I try to accomplish is to use YUI.DataTable in the index.hb.html (View), but can't figure out how the Model's data is accessed for it within Mojito framework.
In the model I have defined in the "getData"-function my connection to the db. The JSON data is fetched correctly and can be used in the html-block of the view with the mustache notation. But how to reference to this data when a YUI.DataTable is defined in the
When you call ac.done(data); data is accessible in mustache variable.
Mostly you will be executing YUI.DataTable at the client side. For that you have to use binder.
In binder you should call your mojit action (say 'X') and then you will get data and then call YUI.dataTable to render
Arska, just a hunch: this.mojitProxy.invoke within a click listener sounds like this is not pointing to the binder object anymore. You either have to use the var self = this; trick to maintain the reference to the binder object or you use Y.bind to bind the click listener callback to the binder object.