There are (at least) a couple options. One would be to create a property like:
numberFormat={0,number,#.##}
And then use <fmt:message>:
<fmt:message key="numberFormat">
<fmt:param value="${aNumber}"/>
</fmt:message>
Another would be to leverage the fact that the pattern attribute of
<fmt:formatNumber> accepts an EL expression. So, you'd load the pattern and
then do:
<fmt:formatNumber value="${aNumber}" pattern="${numberPattern}"/>
There are all kinds of ways you could load the pattern, but one would be:
<fmt:message key="numberPattern" var="numberPattern"/>
Quoting Earl Woodman <[EMAIL PROTECTED]>:
> Hi,
>
> I'm trying to move from bean:writes to fmt:formatNumber in my application,
> but I'm finding that in order to format a number, I can't get a formatting
> pattern from my application resources file - there doesn't seem to be a key
> parameter in the fmt:formatNumber tag. Has anyone run into this problem in
> the past and what have you done about it?
>
> Thanks a lot,
> Earl
>
>
>
> Earl Woodman
> Software Developer
> Verafin Inc
> [EMAIL PROTECTED]
--
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech <http://www.dotech.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]