Currency input behavior.
that have this behavior applied by default (see master style sheet):
<input type=“currency” /> - inline single line <widget type=“currency”></widget> that this behavior knows about:
value=float - initial value of the input elementsize=integer - determines value of (intrinsic and default) width of the element.format - format of number representation, string that accepts following ';'-separated fields:grouping - number, number of digits in “thousand” groups. fdigits - number, fractional digits to show. leading-zero - true/false, show leading zero. decimal-sep - string, separator between integer and fractional parts. grouping-sep - string, separator between groups. negative-sign - true/false, true - show '-', false - wrap digits by '(' ')' characters. currency - string, currency sign to show. currency-after - true - currency sign after , false - sign is before numbers.If the format attribute is ommited then the behavior will use current user settings for currency.
Automatic attributes - set by behavior and can be used for styling purposes:
invalid - behavior will set this attribute if user provide wrong content (e.g. alpha characters) negative - behavior will set this attribute if number is negative.format attribute can also be defined in CSS as a custom attribute -format.
Thus you may define it for group of input elements as:
input.decimal {
behavior:decimal;
-format="fdigits:2; leading-zero:true;"
}
Together with the standard set of events (mouse, keyboard, focus) behavior: button generates:
type json::value::V_FLOAT, reflects current status of internal editing buffer.
See edit