日期:2014-05-18  浏览次数:20655 次

webwork日期格式化问题
webwork默认输出的日期字符串格式为短日期( '07-07-25 '),我试图在 <ww:textfield/> 文本框内输出格式化的日期(2007-07-25),但文本框内输出的内容为 ")} "?
以下是我的代码。请各位帮帮忙,thx....

=======Smpl.action=============

public   class   Ts   extends   ActionSupport   {

Date   dts   =   new   Date();

public   String   execute()   throws   Exception   {
return   SUCCESS;
}
public   Date   getDts()   {
return   dts;
}

}


=======i18n.properties=============
format.date={0,date,yyyy-MM-dd}
format.time={0,date,HH:mm:ss}
text.strx=tsing


=======success.jsp===================
text.strx   =   <ww:text   name= "text.strx "   />  
<br/>
<ww:textfield   name= "dts "   value= "%{getText( 'format.date ',{dts})} "> </ww:textfield>

------解决方案--------------------
没搞过webwork,帮顶