ITeye博客

leomne的博客

leomne · 共 5 篇文章

Ofbiz 用FOP生成PDF文件中文无法显示的解决方案

在开发过程中,发现生成的PDF文件中,所有中文都不能显示,以”#“表示。 在ofbiz中,生成pdf的过程是: 1、访问xxx.pdf的url. 2、controller.xml中对*.pdf配置如下: <handler name="screenfop" type="view" class="org.ofbiz.widget.screen.ScreenFopViewHandler"/> ... <view-map name="PicklistReport.pdf" type="screenfop" page="component://warehouse/widget/warehouse/sc…

2010-06-04 22:01 · 评论(1)

Ofbiz数据库表结构变更不生效问题

ofbiz使用entity,其表结构都放在entitymodel.xml文件中,但是当对表结构的内容作了修改后,重启却发现修改不生效。要使其生效,办法很简单: 在Ofbiz的web tools中,有如下入口:Check/Update Database (访问http://${yourofbiz}/webtools/control/view/checkdb) 此处可以指定更新整个数据库,或更新主键/外键,或只更新一张表。

2010-04-26 21:40 · 评论(0)

Opentaps分页原理

打开opentaps任意一个有分页功能的页面*.ftl文件 其中有如下代码: <@import location="component://opentaps-common/webapp/common/includes/lib/opentapsFormMacros.ftl"/> <div> <@paginate name="layerCategories" list=categories rememberPage="true" sectionName=sectionName> <#noparse> ... </#noparse> </@paginate> </div> 这里<@paginate…

2010-04-19 16:06 · 评论(0)

Ofbiz: 自定义表单校验

用了一段时间ofbiz自带的form widgets工具,发现不是很好用。尤其是与前端配合开发的时候,表单的样式、效果受到了很多的限制。于是决定抛弃form widget,用freemarker。前端开发出来的效果和效率果然有了很大提交。但是存在一个问题,就是用freemarker写的表单提交如何做校验?和Struts不一样,struts框架中自带了form的验证器。那么ofbiz除了form widget以外,有没有办法实现表单验证呢? 答案就在ofbiz的service中。 因为ofbiz的逻辑层是一个一个的services,在给service的定义时,必须要给出传入参数和返回结果(参考…

2010-04-15 21:59 · 评论(0)

Ofbiz: 解决Helper name not found for entity OpenProduct的错误

今天在ofbiz中新建一张表OpenProduct,在ofbiz后台访问这张新表时,出现了如下异常: Helper name not found for entity OpenProduct 检查entitymodel.xml对entity的配置没有问题。在entitygroup.xml文件,也已经把entity"OpenProduct"添加进去了。Delegator为什么还是没有找到这个entity? 原因: 仔细查看ofbiz启动的日志,发现:delegator在初时化之前,先读入所有的entitymodel.xml文件,然后再读入所有的entitygroup.xml文件。在读入完ent…

2010-04-15 13:54 · 评论(0)