开发者

format of int value, change how it is displayed

I am using this line of code to dispaly a string with an int value at the end of it.

<legend><spring:message code="time.createMonth.legend" argu开发者_运维百科ments="${year}"/></legend>

The code is working but it is displaying the int lik a number "2,011" instead of "2011".

How can I format it so as it is displayed without the comma?

is there an easy way that i can just throw a cast or somehting? Like so?

"arguments="${(Sting)year}" or "arguments="${Sting.valueOf(year)}"    ?


Have a look at NumberFormat: http://download.oracle.com/javase/6/docs/api/java/text/NumberFormat.html


I think the easiest would be:

arguments="${'' + year}"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜