lib/packages/core-classes.js
function(config, widget, parent_view, template, properties) {

		var name,
			argument,
			constructor;

		this.guid = Lava.guid++;
		if (Lava.schema.DEBUG && config.id && !Lava.isValidId(config.id)) Lava.t();
		if ('id' in config) {
			this.id = config.id;
		}
		if ('label' in config) {
			this.label = config.label;
		}

		Lava.view_manager.registerView(this);

		this._config = config;
		this._widget = widget;
		this._template = template;

		if (parent_view) {

			this._parent_view = parent_view;
			this._parent_with_container = parent_view.getContainer() ? parent_view : parent_view.getParentWithContainer();
			this.depth = parent_view.depth + 1;

		}

		this._initMembers(properties);

		for (name in config.assigns) {

			if (config.assigns[name].once) {

				argument = new Lava.scope.Argument(config.assigns[name], this, this._widget);
				this.set(name, argument.getValue());
				argument.destroy();

			} else {

				if (name in this._property_bindings_by_property) Lava.t("Error initializing assign: property binding already created");

				this._property_bindings_by_property[name] = new Lava.scope.PropertyBinding(this, name, config.assigns[name]);

			}

		}

		if ('container' in config) {

			constructor = Lava.ClassManager.getConstructor(config.container['type'], 'Lava.view.container');
			this._container = new constructor(this, config.container, widget);

		}

		this._postInit();

		if ('roles' in  config) Lava.view_manager.dispatchRoles(this, config.roles);

	}
function(config, widget, parent_view, template, properties) {

		var name,
			argument,
			constructor;

		this.guid = Lava.guid++;
		if (Lava.schema.DEBUG && config.id && !Lava.isValidId(config.id)) Lava.t();
		if ('id' in config) {
			this.id = config.id;
		}
		if ('label' in config) {
			this.label = config.label;
		}

		Lava.view_manager.registerView(this);

		this._config = config;
		this._widget = widget;
		this._template = template;

		if (parent_view) {

			this._parent_view = parent_view;
			this._parent_with_container = parent_view.getContainer() ? parent_view : parent_view.getParentWithContainer();
			this.depth = parent_view.depth + 1;

		}

		this._initMembers(properties);

		for (name in config.assigns) {

			if (config.assigns[name].once) {

				argument = new Lava.scope.Argument(config.assigns[name], this, this._widget);
				this.set(name, argument.getValue());
				argument.destroy();

			} else {

				if (name in this._property_bindings_by_property) Lava.t("Error initializing assign: property binding already created");

				this._property_bindings_by_property[name] = new Lava.scope.PropertyBinding(this, name, config.assigns[name]);

			}

		}

		if ('container' in config) {

			constructor = Lava.ClassManager.getConstructor(config.container['type'], 'Lava.view.container');
			this._container = new constructor(this, config.container, widget);

		}

		this._postInit();

		if ('roles' in  config) Lava.view_manager.dispatchRoles(this, config.roles);

	}
function ( config , widget , parent_view , template , properties ) { var name , argument , constructor ; this . guid = Lava . guid ++ ; if ( Lava . schema . DEBUG && config . id && ! Lava . isValidId ( config . id ) ) Lava . t ( ) ; if ( 'id' in config ) { this . id = config . id ; } if ( 'label' in config ) { this . label = config . label ; } Lava . view_manager . registerView ( this ) ; this . _config = config ; this . _widget = widget ; this . _template = template ; if ( parent_view ) { this . _parent_view = parent_view ; this . _parent_with_container = parent_view . getContainer ( ) ? parent_view : parent_view . getParentWithContainer ( ) ; this . depth = parent_view . depth + 1 ; } this . _initMembers ( properties ) ; for ( name in config . assigns ) { if ( config . assigns [ name ] . once ) { argument = new Lava . scope . Argument ( config . assigns [ name ] , this , this . _widget ) ; this . set ( name , argument . getValue ( ) ) ; argument . destroy ( ) ; } else { if ( name in this . _property_bindings_by_property ) Lava . t ( "Error initializing assign: property binding already created" ) ; this . _property_bindings_by_property [ name ] = new Lava . scope . PropertyBinding ( this , name , config . assigns [ name ] ) ; } } if ( 'container' in config ) { constructor = Lava . ClassManager . getConstructor ( config . container [ 'type' ] , 'Lava.view.container' ) ; this . _container = new constructor ( this , config . container , widget ) ; } this . _postInit ( ) ; if ( 'roles' in config ) Lava . view_manager . dispatchRoles ( this , config . roles ) ; }
Create an instance of the view, including container and assigns; dispatch roles
@param {_cView} config
@param {Lava.widget.Standard} widget
@param {Lava.view.Abstract} parent_view
@param {Lava.system.Template} template
@param {Object} properties
Create an instance of the view including container and assigns ; dispatch roles