Sets the model for the enclosed TableView in this widget.

        Args:
            model (DataFrameModel): The model to be displayed by
                the Table View.
777581
def setViewModel(self, model):
        
        if isinstance(model, DataFrameModel):
            self.enableEditing(False)
            self.uncheckButton()
            
            selectionModel = self.tableView.selectionModel()
            self.tableView.setModel(model)
            model.dtypeChanged.connect(self.updateDelegate)
            model.dataChanged.connect(self.updateDelegates)
            del selectionModel
844089
public void setModel (ComboBoxModel<?> model)
    {
        // if we had a previous model, unregister ourselves from it
        if (_model != null) {
            _model.removeListDataListener(this);
        }

        // subscribe to our new model
        _model = model;
        _model.addListDataListener(this);

        // rebuild the list
        removeAll();
        addButtons(0, _model.getSize());
    }
1290761
public void setModel( BundleAdjustmentCamera model ) {
		this.model = model;
		numIntrinsic = model.getIntrinsicCount();
		if( numIntrinsic > intrinsic.length ) {
			intrinsic = new double[numIntrinsic];
		}
		model.getIntrinsic(intrinsic,0);

		numericalPoint = createNumericalAlgorithm(funcPoint);
		numericalIntrinsic = createNumericalAlgorithm(funcIntrinsic);
	}
1080130
def _initialize_from_model(self, model):
        
        for name, value in model.__dict__.items():
            if name in self._properties:
                setattr(self, name, value)
796002
def bind(self, model, template="{}"):
        
        self._bound_model = model
        self._uri_template = template
        self._set_uri_from_bound_model()
486233
function (model) {
            if (!this.ngModel) {
                return; // A kb-item can't be selected without a ng-model on the container element.
            }
            if (this.multiple) {
                if (this.isSelected(model) === false) {
                    this.selected.push(model);
                    this.ngModel.$setViewValue(this.selected);
                }
            } else {
                this.selected[0] = model;
                this.ngModel.$setViewValue(model);
            }
        }
482233
def set_model(self, model):
        
        self._model = model
        for c in self.childItems:
            c.set_model(model)
1282351
public function setModel($model)
    {
        if ($model instanceof Model) {
            $this->model = $model;
        } else {
            $this->model = Yii::createObject($model);
        }

        $model = $this->model;
        $this->updateFormName();

        if (empty($this->getScenario())) {
            $this->setScenario($model->scenario);
        }

        return $this->model;
    }
150410
protected function setModelForElements(Model $model)
    {
        $this->getElements()->each(function ($element) use ($model) {
            $element = $this->getElementContainer($element);

            if ($element instanceof WithModelInterface) {
                $element->setModel($model);
            }
        });

        return $this;
    }
356379
public function setModel(\atk4\data\Model $model)
    {
        parent::setModel($model);
        $this->field = $this->field ? $this->field : $this->model->title_field;
        if ($this->autoSave && $this->model->loaded()) {
            if ($this->cb->triggered()) {
                $value = $_POST['value'] ? $_POST['value'] : null;
                $this->cb->set(function () use ($value) {
                    try {
                        $this->model[$this->field] = $this->app->ui_persistence->typecastLoadField($this->model->getElement($this->field), $value);
                        $this->model->save();

                        return $this->jsSuccess('Update successfully');
                    } catch (ValidationException $e) {
                        $this->app->terminate(json_encode([
                              'success'            => true,
                              'hasValidationError' => true,
                              'atkjs'              => $this->jsError(call_user_func($this->formatErrorMsg, $e, $value))->jsRender(),
                          ]));
                    }
                });
            }
        }

        return $this->model;
    }
878879
public function set_model( $model )
    {
        // Check that the required arguments are provided.
        foreach( $this->required_arguments() as $key )
        {
            if ( !isset($model[$key]) )
            {
                throw new \RuntimeException('The required argument "'.$key.'" was not provided for '.get_called_class());
            }
        }
        
        // Assign the name of the component as the id if no id was specified
        if( !isset($model['id']) && isset($model['name']) )
        {
            $model['id'] = $model['name'];
        }

        // A name must be specified when a component has a visibility condition
        if( isset($model['show']) && !isset($model['name']) )
        {
            throw new \RuntimeException('Components with a visibility condition (a "show" argument) must have a name');
        }
        
        $this->model = array_merge( $this->default_model(), $model );
    }
649587
@Override
	public void setModel(final WebComponent component, final WebModel model) {
		map.put(component, model);
	}
904972
def setModel( self, model ):
        
        if model == self._model:
            return False
            
        self._model = model
        
        if not self._record and model:
            self._record = model()
        
        if model:
            uifile = model.schema().property('uifile')
            if ( uifile ):
                self.setUiFile(uifile)
        
        self.rebuild()
        
        return True
600867
def setModel(self, model):
        

        if not model:
            return

        LOGGER.debug("> Setting '{0}' model.".format(model))

        umbra.ui.views.Abstract_QTreeView.setModel(self, model)

        # Signals / Slots.
        self.model().modelAboutToBeReset.connect(self.__model__modelAboutToBeReset)
        self.model().modelReset.connect(self.__model__modelReset)
964858
protected void setForInsertId(final MODEL model) {
        BeanDescriptor descriptor = getModelBeanDescriptor();
        EntityBeanIntercept intercept = ((EntityBean) model)._ebean_getIntercept();
        BeanProperty idProp = descriptor.getIdProperty();
        if (idProp != null) {
            idProp.setValue((EntityBean) model, null);
            intercept.setPropertyUnloaded(idProp.getPropertyIndex());
        }
    }
146367
public void init(ScreenComponent model, boolean bEditableControl)
    {
        super.init(model, bEditableControl);
        if (m_vDisplays == null)
            if (model.getConverter().getString() == null)
                this.scanTableItems();
    }
102920
@Override
    public void setModel(final TableModel dataModel) {
        super.setModel(dataModel);
        if (_panel != null) {
            _panel.updateUI();
        }
    }