YUI({
//Last Gallery Build of this module
gallery: 'gallery-2013.05.10-00-54'
}).use('gallery-model-list-union', function(Y) {
Y.NameModel = Y.Base.create('NameModel', Y.Model, [], {
}, {
ATTRS: {
name: {
value: ''
}
}
});
Y.NameModelList = Y.Base.create('NameModelList', Y.ModelList, [], {
comparator: function (model) {
return model.get('name');
},
model: Y.NameModel
});
var nameModelList0 = new Y.NameModelList().reset([{
name: 'Jeffrey'
}, {
name: 'Emily'
}, {
name: 'Luke'
}]),
nameModelList1 = new Y.NameModelList().reset([{
name: 'Kara'
}, {
name: 'Eric'
}, {
name: 'George'
}]),
nameModelList2 = new Y.NameModelList().reset([{
name: 'Jim'
}, {
name: 'Raymond'
}, {
name: 'Jennifer'
}]),
nameModelListUnion = Y.ModelList.union('NameModelList', nameModelList0, nameModelList1, nameModelList2);
alert(nameModelListUnion.get('name').join(', '));
// Emily, Eric, George, Jeffrey, Jennifer, Jim, Kara, Luke, Raymond
nameModelList1.add({
name: 'Sarah'
});
nameModelList2.add({
name: 'Matthew'
});
alert(nameModelListUnion.get('name').join(', '));
// Emily, Eric, George, Jeffrey, Jennifer, Jim, Kara, Luke, Matthew, Raymond, Sarah
nameModelList0.reset();
alert(nameModelListUnion.get('name').join(', '));
// Eric, George, Jennifer, Jim, Kara, Matthew, Raymond, Sarah
});/home/y/libexec/ant/bin/ant all
Buildfile: build.xml
[echo] Starting Build For gallery-model-list-union
clean:
init:
[mkdir] Created dir: /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-model-list-union/build_tmp
[echo] Starting Build For gallery-model-list-union
-lint-server:
[echo] Starting Build For gallery-model-list-union
-node:
[echo] For faster builds, install Node.js.
-concatdebug:
[copy] Copying 1 file to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-model-list-union/build_tmp/ant
[delete] Deleting directory /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-model-list-union/build_tmp/ant
-registerdebug:
[copy] Copying 1 file to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-model-list-union/build_tmp
-prependdebug:
-appenddebug:
builddebug:
-createcore:
[copy] Copying 1 file to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-model-list-union/build_tmp
-loggerregex:
buildcore:
-rollupjs:
-concatskins:
-buildskins:
-rollupcss:
buildskins:
-buildlangs:
-rolluplangs:
buildlangs:
build:
minify:
[yuicompressor] Compressing /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-model-list-union/build_tmp/gallery-model-list-union.js
[yuicompressor]
[yuicompressor] [WARNING] Invalid hint syntax: use strict
[yuicompressor] Y){(function(Y){ ---> "use strict" <--- ;var _Array=Y.Array,_ModelList=
[yuicompressor] Compressed to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-model-list-union/build_tmp/gallery-model-list-union-min.js
lint:
[echo] Using Rhino. Install nodejs to improve jslint speed, or skip with -Dlint.skip=true
[java] Running JSLint on : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-model-list-union/build_tmp/gallery-model-list-union.js
[java] - OK
local:
deploybuild:
[copy] Copying 3 files to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build/gallery-model-list-union
deployassets:
deployskins:
deploylang:
deploydocs:
deploy:
all:
BUILD SUCCESSFUL
Total time: 2 seconds
© 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