strus2格式化数字和日期(转)

it2026-10-05  5

strus2格式化数字和日期

文章分类:Java编程 先在class目录下建资源文件(根据实际情况加相应内容)如:applicationResource_zh_CN.properties中 format.number.money = {0,number,###,###.00} global.format.datetime = {0, date, yyyy-MM-dd HH:mm:ss} global.format.date = {0, date, yyyy-MM-dd} struts.xml中加上 <constant name="struts.custom.i18n.resources" value="applicationResource"></constant> 页面上用 <s:text name="format.number.money">    <s:param value="值"/> </s:text> <s:text name="global.format.datetime">    <s:param value="obj.sj"/> </s:text> 其它方法 <s:date name="#request.time" format="yyyy-MM-dd"/> <input type="text" name="time1" value="<s:date format="yyyy-MM-dd" name="#request.time"/>"> <s:textfield name="#request.sys.time" >         <s:param name="value"><s:date name="#request.time" format="yyyy-MM-dd"/></s:param> </s:textfield> <s:textfield name="time" value="%{getText('global.format.date',{#request.time})}" />

转载于:https://www.cnblogs.com/wishma/archive/2010/12/29/1920565.html

相关资源:数据结构—成绩单生成器
最新回复(0)