在Struts2.0.11.1版本,相应的指南中
http://struts.apache.org/2.0.11.1/docs/formatting-dates-and-numbers.html
Localizing form data with getText
Localizing form data with getText
Placing a textfield in a form like this
<s:textfield key="orderItem.price" />
引用to input a number, one might have noticed that the ...
- 13:17
- 浏览 (173)
- 论坛浏览 (431)
- 评论 (2)
- 分类: struts2
struts2-number-plugin插件简单源代码
功能就是成文本输入框,或者文本显示时,数据与日期格式可以自定义显示,至于用法按我之前的二篇文章所写。
为了格式化钱编辑框的格式,如保留后二位。Struts2没有提供相应的标签。struts1支持property的format属性。
于是自己写了一个关于数据格式化的插件。
在struts2包里的META-INF/struts-tags.tld
新增如下内容:
xml 代码
<tag>
<name>number</name>
<tag-class>org.apache.struts2.views.jsp.ui.NumberTag</tag- ...
我的相册
DSC00526
共 40 张
共 40 张
链接
最新评论
-
JBOSS应用服务器下载地址
laji,bu gei ge juti de!
-- by solejava -
自己写的Struts2.0+hibern ...
实体是从hibernate生成的hbm.xml文件
-- by sys53 -
自己写的Struts2.0+hibern ...
兄弟,搞个说明文档撒。。。 再搞几个截图更好。。。 就一个exe文件,运行起来 ...
-- by weiweichen1985 -
myeclipse6.0注册码收藏
能用啊 谢谢
-- by 349317925 -
Struts2 文本域中数值格化 ...
<s:textfield key="orderItem.price" va ...
-- by sys53







评论排行榜