5.5.2.1.9. CurrencyField
CurrencyField
is a subtype of a text field designed for currency value input. It has a currency symbol inside the field and is aligned to the right by default.
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 datasource using the datasource
and the property
attributes:
<currencyField currency="$"
datasource="orderDs"
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.
- Attributes of currencyField
-
align - caption - colspan - contextHelpText - contextHelpTextHtmlEnabled - currency - currencyLabelPosition - datasource - datatype - description - editable - enable - height - icon - id - property - required - requiredMessage - rowspan - showCurrencyLabel - stylename - visible - width
- Predefined styles of currencyField
- API
-
addValidator - addValueChangeListener - commit - discard - isModified - setContextHelpIconClickHandler - setCurrency - setCurrencyLabelPosition - setShowCurrencyLabel