protected ExtendedDataModel<?> createExtendedDataModel() {
ExtendedDataModel<?> dataModel;
Object value = getValue();
if (value == null) {
dataModel = new DeclarativeTreeDataModelImpl(this);
} else if (value instanceof TreeNode) {
dataModel = new ClassicTreeNodeDataModelImpl();
dataModel.setWrappedData(value);
} else if (value instanceof TreeDataModel<?>) {
if (value instanceof ExtendedDataModel<?>) {