Brian J. Miller![]()
Simple extension that allows associating a particular model/modellist class with the value for an attribute such that an object is constructed for the value when specifying an id in the configuration information.
Also makes the consuming model a bubble event target for the consumed model.
Example of a widget using Y.ModelConsumer with a model based attribute.
<script src="http://yui.yahooapis.com/3.5.0pr4/build/yui/yui-min.js"></script>YUI({
//Last Gallery Build of this module
gallery: 'gallery-2012.04.04-17-55'
}).use('gallery-model-consumer', function(Y) {
var myConsumer = Y.Base.create(
"myConsumer",
Y.Widget,
[ Y.ModelConsumer ],
{ ... },
{
ATTRS: {
pie: {
value: null,
setter: "_setM",
mClass: Y.M.Pie
}
}
}
);
});
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info