How about using an IConverter since the issue is not about the data itself
but the representation of it?
For example, you could create a Label class that overrides the
getConverter() and return a BigDecimalConverter object that overrides
the getNumberFormat method to return something like
I added a setter for each property, but it's still not working (tried
matching field types as well). I guess I'll just have to stick with the
IModel route, even though I don't like it.
I changed the Doubles to BigDecimal, thanks for the reminder.
--
Sent from:
Hi,
The "problem" you face is that Wicket tries to find both getter and setter
[1] and if any of them do not exist then it falls back to the field.
I'd continue using a custom IModel for this use case.
And I'd also change the type of the "amount" to BigDecimal! Doing math with
doubles when