lib/packages/core-classes.js
function(argument, view, widget, config) {

		var i = 0,
			count,
			depends,
			bind;

		this.guid = Lava.guid++;
		this._argument = argument;
		this._view = view;
		this._widget = widget;
		this.level = argument.level + 1;

		if (config) {

			if (Lava.schema.DEBUG && ['Enumerable', 'DataView'].indexOf(config['own_enumerable_mode']) == -1) Lava.t('Unknown value in own_enumerable_mode option: ' + config['own_enumerable_mode']);

			if (config['own_enumerable_mode'] == "DataView") {
				this._refreshDataSource = this._refreshDataSource_DataView;
				this._value = new Lava.system.DataView();
			} else {
				this._refreshDataSource = this._refreshDataSource_Enumerable;
				this._value = new Lava.system.Enumerable();
			}

			this._own_collection = true;

			if (config['depends']) {

				depends = config['depends'];
				this._binds = [];
				this._bind_changed_listeners = [];

				for (count = depends.length; i < count; i++) {

					if (depends[i].isDynamic) {

						bind = view.locateViewByPathConfig(depends[i]).getDynamicScope(view, depends[i]);

					} else {

						bind = view.getScopeByPathConfig(depends[i]);

					}

					this._binds.push(bind);
					this._bind_changed_listeners.push(bind.on('changed', this._onDependencyChanged, this));

				}

			}

		}

		this._argument_changed_listener = this._argument.on('changed', this.onDataSourceChanged, this);
		this.refreshDataSource();

	}
function(argument, view, widget, config) {

		var i = 0,
			count,
			depends,
			bind;

		this.guid = Lava.guid++;
		this._argument = argument;
		this._view = view;
		this._widget = widget;
		this.level = argument.level + 1;

		if (config) {

			if (Lava.schema.DEBUG && ['Enumerable', 'DataView'].indexOf(config['own_enumerable_mode']) == -1) Lava.t('Unknown value in own_enumerable_mode option: ' + config['own_enumerable_mode']);

			if (config['own_enumerable_mode'] == "DataView") {
				this._refreshDataSource = this._refreshDataSource_DataView;
				this._value = new Lava.system.DataView();
			} else {
				this._refreshDataSource = this._refreshDataSource_Enumerable;
				this._value = new Lava.system.Enumerable();
			}

			this._own_collection = true;

			if (config['depends']) {

				depends = config['depends'];
				this._binds = [];
				this._bind_changed_listeners = [];

				for (count = depends.length; i < count; i++) {

					if (depends[i].isDynamic) {

						bind = view.locateViewByPathConfig(depends[i]).getDynamicScope(view, depends[i]);

					} else {

						bind = view.getScopeByPathConfig(depends[i]);

					}

					this._binds.push(bind);
					this._bind_changed_listeners.push(bind.on('changed', this._onDependencyChanged, this));

				}

			}

		}

		this._argument_changed_listener = this._argument.on('changed', this.onDataSourceChanged, this);
		this.refreshDataSource();

	}
function ( argument , view , widget , config ) { var i = 0 , count , depends , bind ; this . guid = Lava . guid ++ ; this . _argument = argument ; this . _view = view ; this . _widget = widget ; this . level = argument . level + 1 ; if ( config ) { if ( Lava . schema . DEBUG && [ 'Enumerable' , 'DataView' ] . indexOf ( config [ 'own_enumerable_mode' ] ) == - 1 ) Lava . t ( 'Unknown value in own_enumerable_mode option: ' + config [ 'own_enumerable_mode' ] ) ; if ( config [ 'own_enumerable_mode' ] == "DataView" ) { this . _refreshDataSource = this . _refreshDataSource_DataView ; this . _value = new Lava . system . DataView ( ) ; } else { this . _refreshDataSource = this . _refreshDataSource_Enumerable ; this . _value = new Lava . system . Enumerable ( ) ; } this . _own_collection = true ; if ( config [ 'depends' ] ) { depends = config [ 'depends' ] ; this . _binds = [ ] ; this . _bind_changed_listeners = [ ] ; for ( count = depends . length ; i < count ; i ++ ) { if ( depends [ i ] . isDynamic ) { bind = view . locateViewByPathConfig ( depends [ i ] ) . getDynamicScope ( view , depends [ i ] ) ; } else { bind = view . getScopeByPathConfig ( depends [ i ] ) ; } this . _binds . push ( bind ) ; this . _bind_changed_listeners . push ( bind . on ( 'changed' , this . _onDependencyChanged , this ) ) ; } } } this . _argument_changed_listener = this . _argument . on ( 'changed' , this . onDataSourceChanged , this ) ; this . refreshDataSource ( ) ; }
Create an instance of the Foreach scope. Refresh value

@param {Lava.scope.Argument} argument
@param {Lava.view.Foreach} view
@param {Lava.widget.Standard} widget
@param {?_cScopeForeach} config
Create an instance of the Foreach scope . Refresh value