Formidable.Classes.ListerRow = Base.extend({
	uid: false,
	_parent: false,
	constructor: function(oConfig) { Object.extend(this, oConfig);},
	rdt: function(sRdt) {
		return this._parent.oForm.o(this._parent.config.rdtbyrow[this.uid][sRdt]);
	}
});

Formidable.Classes.Lister = Formidable.Classes.RdtBaseClass.extend({
	constructor: function(oConfig) {
		this.base(oConfig);
	},
	getRow: function(iUid) {
		return new Formidable.Classes.ListerRow({
			"uid": iUid,
			"_parent": this
		});
	},
	getRows: function() {
		var aRows = $A();
		
		$H(this.config.rdtbyrow).each(function(oData) {
			aRows.push(this.getRow(oData[0]));
		}.bind(this));

		return aRows;
	},
	getCurrentRow: function() {
		aContext = this.oForm.getContext();
		if(typeof(aContext.currentrow) != "undefined") {
			return this.getRow(aContext.currentrow);
		}
	}
});
