PL-1202 Разработать механизм работы с динамическими атрибутами

Fix required message
#PL-1202
This commit is contained in:
Eugeny Degtyarjov 2015-05-14 07:35:04 +00:00
parent beead50830
commit 7ad1cacf95
2 changed files with 5 additions and 1 deletions

View File

@ -316,7 +316,7 @@ public class RuntimePropertiesFrame extends AbstractWindow {
String requiredMessage = messages.formatMessage(
AppConfig.getMessagesPack(),
"validation.required.defaultMsg",
field.getId()
categoryAttributeValue.getCategoryAttribute().getName()
);
fieldGroup.setRequired(field, categoryAttributeValue.getCategoryAttribute().getRequired() && requiredControlEnabled, requiredMessage);
}

View File

@ -187,6 +187,10 @@ public class FieldGroupLoader extends AbstractFieldLoader {
field.setCaption(attribute.getName());
field.setDatasource(ds);
field.setRequired(attribute.getRequired());
field.setRequiredError( messages.formatMessage(
messages.getMainMessagePack(),
"validation.required.defaultMsg",
attribute.getName()));
if (fieldGroup.getWidth() > 0) {
field.setWidth("100%");