Re: Force Model to use getter

2017-12-01 Thread Andrew Geery
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

Re: Force Model to use getter

2017-12-01 Thread sorinev
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:

Re: Force Model to use getter

2017-12-01 Thread Martin Grigorov
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