You can now specify a format constraint for a bean property. RIFE will detect it when it calls the property's setter and use it to parse the injected value. This can, for example, be used to allow users to enter a price in the local format and have it stored as a BigDecimal internally.
For example:
NumberFormat amount_format = NumberFormat.getNumberInstance(new Locale("nl", "BE"));
amount_format.setMinimumFractionDigits(2);
amount_format.setMaximumFractionDigits(2);
addGroup("donation")
.addConstraint(new ConstrainedProperty("amount")
.precision(10)
.scale(2)
.rangeBegin(new BigDecimal(0))
.format(amount_format));
The format constraint above allows people to enter the amount 386,50 in a form's input field and have it stored automatically as the number 386.50 in the bean property.