mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-04 20:28:00 +08:00
PL-8837 Category attribute fields that depend on the value of other fields, should be disabled until the main field is filled in
This commit is contained in:
parent
0ab4074785
commit
657ccabc92
@ -389,6 +389,8 @@ public class AttributeEditor extends AbstractEditor<CategoryAttribute> {
|
||||
if (attribute.getDataType() == PropertyType.ENTITY) {
|
||||
if (StringUtils.isNotBlank(attribute.getEntityClass())) {
|
||||
defaultEntityField.setEditable(true);
|
||||
whereField.setEditable(true);
|
||||
joinField.setEditable(true);
|
||||
Class entityClass = attribute.getJavaClassForEntity();
|
||||
MetaClass metaClass = metadata.getClass(entityClass);
|
||||
defaultEntityField.setMetaClass(metaClass);
|
||||
@ -398,6 +400,8 @@ public class AttributeEditor extends AbstractEditor<CategoryAttribute> {
|
||||
dynamicAttributesGuiTools.initEntityPickerField(defaultEntityField, attribute);
|
||||
} else {
|
||||
defaultEntityField.setEditable(false);
|
||||
whereField.setEditable(false);
|
||||
joinField.setEditable(false);
|
||||
}
|
||||
|
||||
if (Boolean.TRUE.equals(attribute.getLookup())) {
|
||||
|
Loading…
Reference in New Issue
Block a user