You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Monkeyden <mo...@gmail.com> on 2006/09/24 20:46:11 UTC
Sort of OT
Using Struts 1.2.9, Tomcat 4, <fmt-rt:number> tag as such:
<fmt-rt:formatNumber value="${result.avgPoints}" pattern="#.##"/>
Getting "In <formatNumber>, value attribute can not be parsed into
java.lang.Number: "${result.avgPoints}"
"avgPoints" is a Float in the object.
Any ideas?
Re: Sort of OT
Posted by Jerome Gagner <ph...@gmail.com>.
It's probably because you're using an rt tag (ignores EL I believe) .
On 9/24/06, Monkeyden <mo...@gmail.com> wrote:
>
> Nevermind. As it turns out, it works with a nested <c:out> tag, but not
> inline. I'm pretty sure this has something to do with the way struts
> exposes variables vs. the way JSTL does it.
>
> <fmt-rt:formatNumber pattern="#.##">
> <c:out value="${result.avgPoints}"/>
> </fmt-rt:formatNumber>
>
>
>
> On 9/24/06, Monkeyden <mo...@gmail.com> wrote:
> >
> > Using Struts 1.2.9, Tomcat 4, <fmt-rt:number> tag as such:
> >
> > <fmt-rt:formatNumber value="${result.avgPoints}" pattern="#.##"/>
> >
> > Getting "In <formatNumber>, value attribute can not be parsed into
> > java.lang.Number: "${result.avgPoints}"
> >
> > "avgPoints" is a Float in the object.
> >
> > Any ideas?
> >
>
>
Re: Sort of OT
Posted by Monkeyden <mo...@gmail.com>.
Nevermind. As it turns out, it works with a nested <c:out> tag, but not
inline. I'm pretty sure this has something to do with the way struts
exposes variables vs. the way JSTL does it.
<fmt-rt:formatNumber pattern="#.##">
<c:out value="${result.avgPoints}"/>
</fmt-rt:formatNumber>
On 9/24/06, Monkeyden <mo...@gmail.com> wrote:
>
> Using Struts 1.2.9, Tomcat 4, <fmt-rt:number> tag as such:
>
> <fmt-rt:formatNumber value="${result.avgPoints}" pattern="#.##"/>
>
> Getting "In <formatNumber>, value attribute can not be parsed into
> java.lang.Number: "${result.avgPoints}"
>
> "avgPoints" is a Float in the object.
>
> Any ideas?
>