public function handle(EncodePropertyValueFromWidgetEvent $event)
    {
        if (!parent::wantToHandle($event) || ($event->getProperty() !== 'colname')) {
            return;
        }

        $oldColumnName = $event->getModel()->getProperty($event->getProperty());
        $columnName    = $event->getValue();
        $metaModel     = $this->getMetaModelByModelPid($event->getModel());

        if ((!$columnName) || $oldColumnName !== $columnName) {
            $this->tableManipulator->checkColumnDoesNotExist($metaModel->getTableName(), $columnName);

            $colNames = array_keys($metaModel->getAttributes());
            if (in_array($columnName, $colNames)) {
                throw new \RuntimeException(
                    sprintf(
                        $event->getEnvironment()->getTranslator()->translate('columnExists', 'ERR'),
                        $columnName,
                        $metaModel->getTableName()
                    )
                );
            }
        }
    }