Skip to content

Instantly share code, notes, and snippets.

@brianjmiller
brianjmiller / gist:3667321
Created Sep 7, 2012 — forked from ericf/gist:3666772
Using Y.ModelConsumer
View gist:3667321
// assumes existence of Y.UserModel
YUI.add('user-view', function (Y) {
Y.UserView = Y.Base.create('userView', Y.View, [ Y.ModelConsumer ], {
template: Y.Handlebars.templates['user'],
initializer: function () {
var user = this.get('user');
View gist:995783
Y.namespace('tnsg5').Tile = Y.Base.create("tile", Y.Widget,[], {
initializer: function () {
this.dataSource = this.getDataSourceInstance();
var dsCfg = {
request: "cb={}",
callback: {
//HERE IS WHERE THE FUNCTION IS ADDED
success: Y.bind(this.onSuccessfulLoad, this)
View gist:760148
/*
* Validator Attribute
*
* @attribute validators
* @type {object}
* @default {isNumber & customVal}
* @since 1.0.0
*/
validators : {
value : {