Help Needed in EL
posted 19 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
<fmt:message key="label.accountdetailsjsp.term_months">
<fmt
aram value="${requestbean.term}"/>
</fmt:message>
Here the term is printed as 00060 Months. I wanted that to be 60 months.
How can i do that? Can i do that in the EL itself.
Any help is appreciated.
<fmt
aram value="${requestbean.term}"/></fmt:message>
Here the term is printed as 00060 Months. I wanted that to be 60 months.
How can i do that? Can i do that in the EL itself.
Any help is appreciated.
posted 19 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
You might be able to trick it like this:
<fmt:message key="label.accountdetailsjsp.term_months">
<fmt
aram value="${requestbean.term + 0}"/>
</fmt:message>
I believe this would convert term from a String to an int before setting the param value.
<fmt:message key="label.accountdetailsjsp.term_months">
<fmt
aram value="${requestbean.term + 0}"/></fmt:message>
I believe this would convert term from a String to an int before setting the param value.
A good workman is known by his tools.
Viji Elango
Ranch Hand
Posts: 36
posted 19 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Thanks Marc. But i doubt whether this code will be approved during code review..
posted 19 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Can't you format it in the bean?
Bosun (SCJP, SCWCD).
So much trouble in the world -- Bob Marley
| This parrot is no more. It has ceased to be. Now it's a tiny ad: The new gardening playing cards kickstarter is now live! https://www.kickstarter.com/projects/paulwheaton/garden-cards |











