The mojit controller provides the photo URLs for the scrollable content widget.
In the controller.server.js below, the photos array that contains the
photo URLs and the text for the image alt attribute is passed to the
index template.

YUI.add('scroll',function(Y,NAME){Y.namespace('mojito.controllers')[NAME]={index:function(ac){// Populate Templateac.done({title:'Scroll View',photos:[{url:'http://farm5.static.flickr.com/4136/4802088086_c621e0b501.jpg',alt:'Above The City II'},{url:'http://farm5.static.flickr.com/4114/4801461321_1373a0ef89.jpg',alt:'Walls and Canyon'},{url:'http://farm5.static.flickr.com/4100/4801614015_4303e8eaea.jpg',alt:'Stairs Using In Situ Stone'},{url:'http://farm5.static.flickr.com/4076/4801368583_854e8c0ef3.jpg',alt:'Tree Silhouette'}]});}};},'0.0.1',{requires:[]});

In the binder index.js below, the YUI ScrollView module is required
by adding the string scrollview to the required array. To create the scrolling
content widget, you need to instantiate a ScrollView object by passing an object
containing parameters for the container (srcNode), an ID, dimensions, and
scroll behavior (flick) and then use the method render to attach the scroll
view to the HTML DOM.

To have the controller send image data to the template for the scrolling
widget, replace the code in controller.server.js with the following:

YUI.add('scroll',function(Y,NAME){Y.namespace('mojito.controllers')[NAME]={index:function(ac){// Populate Templateac.done({title:'Scroll View',photos:[{url:'http://farm5.static.flickr.com/4136/4802088086_c621e0b501.jpg',alt:'Above The City II'},{url:'http://farm5.static.flickr.com/4114/4801461321_1373a0ef89.jpg',alt:'Walls and Canyon'},{url:'http://farm5.static.flickr.com/4100/4801614015_4303e8eaea.jpg',alt:'Stairs Using In Situ Stone'},{url:'http://farm5.static.flickr.com/4076/4801368583_854e8c0ef3.jpg',alt:'Tree Silhouette'}]});}};},'0.0.1',{requires:[]});

To instantiate a ScrollView and have it rendered in the DOM, replace the