|
Struts example source code file (ResultSet.js)
The Struts ResultSet.js source code/* Copyright (c) 2004-2006, The Dojo Foundation All Rights Reserved. Licensed under the Academic Free License version 2.1 or above OR the modified BSD license. For more information on Dojo licensing, see: http://dojotoolkit.org/community/licensing.shtml */ dojo.provide("dojo.data.old.ResultSet"); dojo.require("dojo.lang.assert"); dojo.require("dojo.collections.Collections"); dojo.data.old.ResultSet = function (dataProvider, arrayOfItems) { dojo.lang.assertType(dataProvider, dojo.data.old.provider.Base, {optional:true}); dojo.lang.assertType(arrayOfItems, Array, {optional:true}); dojo.data.old.Observable.call(this); this._dataProvider = dataProvider; this._arrayOfItems = []; if (arrayOfItems) { this._arrayOfItems = arrayOfItems; } }; dojo.inherits(dojo.data.old.ResultSet, dojo.data.old.Observable); dojo.data.old.ResultSet.prototype.toString = function () { var returnString = this._arrayOfItems.join(", "); return returnString; }; dojo.data.old.ResultSet.prototype.toArray = function () { return this._arrayOfItems; }; dojo.data.old.ResultSet.prototype.getIterator = function () { return new dojo.collections.Iterator(this._arrayOfItems); }; dojo.data.old.ResultSet.prototype.getLength = function () { return this._arrayOfItems.length; }; dojo.data.old.ResultSet.prototype.getItemAt = function (index) { return this._arrayOfItems[index]; }; dojo.data.old.ResultSet.prototype.indexOf = function (item) { return dojo.lang.indexOf(this._arrayOfItems, item); }; dojo.data.old.ResultSet.prototype.contains = function (item) { return dojo.lang.inArray(this._arrayOfItems, item); }; dojo.data.old.ResultSet.prototype.getDataProvider = function () { return this._dataProvider; }; Other Struts examples (source code examples)Here is a short list of links related to this Struts ResultSet.js source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.