PL-7703 Currency field

This commit is contained in:
Daniil Tsarev 2017-09-27 17:47:10 +04:00
parent d3e333938a
commit bdc538458c
4 changed files with 4 additions and 4 deletions

View File

@ -78,7 +78,7 @@ public class DesktopCurrencyField extends DesktopTextField implements CurrencyFi
return;
//noinspection unchecked
currency = (String) ((Map<String, Object>) annotation).get("name");
currency = (String) ((Map<String, Object>) annotation).get("currency");
}
}
}

View File

@ -33,5 +33,5 @@ public @interface CurrencyValue {
/**
* Currency name: USD, GBP, EUR, $, or another currency sign.
*/
String name() default StringUtils.EMPTY;
String currency() default StringUtils.EMPTY;
}

View File

@ -88,7 +88,7 @@ public class CurrencyFieldLoader extends AbstractFieldLoader<CurrencyField> {
//noinspection unchecked
Map<String, Object> currencyValue = (Map<String, Object>) obj;
String currencyName = (String) currencyValue.get("name");
String currencyName = (String) currencyValue.get("currency");
if (StringUtils.isNotEmpty(currencyName)) {
((CurrencyField) component).setCurrency(currencyName);
}

View File

@ -94,7 +94,7 @@ public class WebCurrencyField extends WebAbstractField<CubaCurrencyField> implem
//noinspection unchecked
Map<String, Object> currencyValue = (Map<String, Object>) obj;
String currencyName = (String) currencyValue.get("name");
String currencyName = (String) currencyValue.get("currency");
component.setCurrency(currencyName);
}
}