bboss标签库cell标签格式化数字实例
带double类型的po对象定义:
package test;
public class TestBean {
private String id;
private String name;
private TestBean inner;
private long sellMonery = 1000l;
private double selldoubleMonery = 100000.00d;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public TestBean getInner() {
return inner;
}
public void setInner(TestBean inner) {
this.inner = inner;
}
public long getSellMonery() {
return sellMonery;
}
public void setSellMonery(long sellMonery) {
this.sellMonery = sellMonery;
}
public double getSelldoubleMonery() {
return selldoubleMonery;
}
public void setSelldoubleMonery(double selldoubleMonery) {
this.selldoubleMonery = selldoubleMonery;
}
}
初始化一个TestBean对象并设置到request中:
//构建TestBean对象
TestBean bean = new TestBean();
bean.setId("uuid");
bean.setName("多多");
bean.setSellMonery(10000000);
bean.setSelldoubleMonery(10000000.334d);//只有double类型的数字小数位,###,###.##才能正确输出后面的小数
TestBean ibean = new TestBean();
ibean.setId("uuidinner");
ibean.setName("多多uuidinner");
ibean.setSellMonery(10000000);
bean.setInner(ibean);
request.setAttribute("testbean",bean);
通过cell标签输出各个属性,并且利用numformat属性格式化SellMonery和selldoubleMonery两个属性:
<pg:beaninfo actual="${testbean }">
<tr class="cms_data_tr">
<td>
testbean:
</td>
<td>
selldoubleMonery:<pg:cell colName="selldoubleMonery" numerformat="###,###.###"/>
</td>
<td>
sellMonery:<pg:cell colName="sellMonery" numerformat="###,##"/>
</td>
<td>
id:<pg:cell colName="id" />
</td>
<td>
name:<pg:cell colName="name" />
</td>
<td>
innerid:<pg:cell colName="inner" property="id" />
</td>
<td>
innername:<pg:cell colName="inner" property="name" />
</td>
</tr>
</pg:beaninfo>
分享到:
相关推荐
Bboss和xstream序列化反序列化性能对比1
bboss会话共享培训文档,学习bboss不可多得的资料,值得拥有。
bboss es特点请访问: https://www.oschina.net/p/bboss-elastic
Bboss国际化实践.ppt
企业级 J2EE 开源框架:bboss
bboss+es基本操作示例,elasticsearch,bboss,java使用demo
bboss-datatran 由 bboss 开源的数据采集&流批一体化工具,提供数据采集、数据清洗转换处理和数据入库以及数据指标统计计算流批一体化处理功能。
官方版本,亲测可用
springboot集成ElasticsearchBboss调用Elasticsearch的案例分享
NULL 博文链接:https://yin-bp.iteye.com/blog/926166
bboss功能涵盖ioc,mvc,jsp自定义标签库,持久层,全局事务托管,安全认证,SSO,web会话共享,cxfwebservice服务发布和管理,hessian服务发布和管理等功能。另外还提供了符合中国式自由流的bboss activiti工作流...
资源目录: 项目源码(eshelloword.rar) bboss elasticsearch开发入门教程.wmv 搭建bboss elasticsearch开发环境.wmv 说明.txt
Elasticsearch rest client bboss介绍-Elastic2018中国开发者大会演讲稿
NULL 博文链接:https://yin-bp.iteye.com/blog/2174863
NULL 博文链接:https://yin-bp.iteye.com/blog/2177475
本实例是一个基于bboss es spring boot starter的demo maven工程,可供spring boot项目集成bboss elasticsearch rest client参考 展示了通过spring boot管理单集群功能和管理多集群功能 单集群测试用例:...
浙江移动BBOSS系统快速入门手册V0.1归类.pdf
NULL 博文链接:https://yin-bp.iteye.com/blog/1131637
NULL 博文链接:https://yin-bp.iteye.com/blog/1449900
官方版本,亲测可用