mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-04 20:28:00 +08:00
PL-7703 Currency field
This commit is contained in:
parent
d3e333938a
commit
bdc538458c
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user