3.5.2.1.10. CurrencyField

CurrencyField is a subtype of a text field designed for currency value input. CurrencyField is used by default in screens generated by Studio for the attributes annotated with @CurrencyValue annotation. It has a currency symbol inside the field and is aligned to the right by default.

gui currencyField

XML-name of the component: currencyField.

CurrencyField is implemented for Web Client only.

Basically, CurrencyField repeats the functionality of TextField. You can manually set a datatype for the field, except that only numeric datatypes inheriting NumericDatatype class are supported. If the datatype is unparseable, an exception will be thrown.

CurrencyField can be bound to a data container using the dataContainer and property attributes:

<currencyField currency="$"
               dataContainer="orderDc"
               property="amount"/>

currencyField attributes:

  • currency - a text that will be a content of the currency label.

    <currencyField currency="USD"/>
  • currencyLabelPosition - sets the position of currency label inside the field:

    • LEFT - to the left from the text input component,

    • RIGHT - to the right from the text input component (default value).

  • showCurrencyLabel - defines whether the currency label should be displayed.