On 5/5/06, Geoff Longo <[EMAIL PROTECTED]> wrote:
We had a similar issue. We have all our currencies defined as Doubles
currently, but we would get errors on values that resolved to Longs
(ex. 1.0). We had to create our own converter that always converted
the Number to a Double.
We wanted to extend the existing number converter just like you
mentioned, but I wasn't sure how to do that and still be able to pass
parameters into the converter. Can you shed any light on this?
I posted the code for the actual converter earlier (at least for a
BigDecimal version).
I'd think the code for the Converter tag would be fairly simple --
you'd extend the original NumberConverterTag, give it a new
converter-id, and that'd pretty much be it. And you'd need to add a
tld entry. I don't think there's a lot to it than some busy-work.
Maybe it would be worthwhile to make this into a sandbox component
with user-configurable return types.