The Gallery is deprecated. No new Gallery components may be submitted, and modifying existing components is disabled. For more information please read the Gallery Deprecation blog post. This is a static snapshot of the Gallery for archive purposes.
See 2 more by this user. Created: 04/3/12
Last CDN Push: 04/4/12
Build Tag: gallery-2012.04.04-17-55
Project: YUI 3
License: YUI BSD
YUI Version: 3.5.0pr4
Free for use.
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
}
}
}
);
});
All code on this site is licensed under the BSD License unless stated otherwise.