PL-8057 Dynamic attributes with collection types - isCollection checkbox in attribute editor

This commit is contained in:
Maxim Gorbunkov 2016-10-25 15:15:45 +04:00
parent 8b342aa492
commit 42c9ea0e22
4 changed files with 4 additions and 1 deletions

View File

@ -92,6 +92,7 @@ CategoryAttribute.defaultBoolean=Default value
CategoryAttribute.defaultDate=Default value
CategoryAttribute.defaultEntityId=Default value
CategoryAttribute.required=Required attribute
CategoryAttribute.isCollection=Is collection
CategoryAttribute.screen=Entity selection screen
CategoryAttribute.category = Category
CategoryAttribute.categoryEntityType = Category entity type

View File

@ -92,6 +92,7 @@ CategoryAttribute.defaultBoolean=Значение по умолчанию
CategoryAttribute.defaultDate=Значение по умолчанию
CategoryAttribute.defaultEntityId=Значение по умолчанию
CategoryAttribute.required=Обязательный атрибут
CategoryAttribute.isCollection=Коллекция
CategoryAttribute.screen=Экран выбора сущности
CategoryAttribute.category=Категория
CategoryAttribute.categoryEntityType = Тип категории

View File

@ -48,7 +48,7 @@ import java.util.*;
*/
public class AttributeEditor extends AbstractEditor<CategoryAttribute> {
protected static final Multimap<PropertyType, String> FIELDS_VISIBLE_FOR_DATATYPES = ArrayListMultimap.create();
protected static final Set<String> ALWAYS_VISIBLE_FIELDS = new HashSet<>(Arrays.asList("name", "code", "required", "dataType"));
protected static final Set<String> ALWAYS_VISIBLE_FIELDS = new HashSet<>(Arrays.asList("name", "code", "required", "dataType", "isCollection"));
static {
FIELDS_VISIBLE_FOR_DATATYPES.put(PropertyType.BOOLEAN, "defaultBoolean");

View File

@ -39,6 +39,7 @@
<field id="name" required="true" width="100%"/>
<field id="code" required="true" width="100%"/>
<field id="required"/>
<field id="isCollection"/>
<field id="dataType" custom="true" required="true" width="100%"/>
<field id="entityClass" custom="true" required="true" width="100%"/>