I need a PrimeFaces input component to get / set the amount of cash, which means a decimal number with two digits after the floating point.
I tried using inputMask, for example
<p:inputMask value="#{moneyBean.amount}" mask="999.99"/>
But I can’t find a way to set a mask that can limit:
- 1 or more arithmetic values before a floating point
- Optional floating point " . "
- 0 to 2 arithmetic values after floating point
For example, some valid inputs are:
- 1234.56
- 1234.5
- 2.8
- 120
- 120.00
Any ideas for effectively entering this parameter?