/** * Makes sure that the specified property type can be actually displayed. * * @param key the property * @param type the type * @return the (potentially) fixed type */ protected PropertyType fixPropertyType(String key, PropertyType type) { if (type == PropertyType.CUSTOM_COMPONENT) { if (!hasComponent(key)) type = PropertyType.STRING; } else if (type == PropertyType.LIST) { if (!hasList(key)) type = PropertyType.STRING; } return type; }