BBCodeUtil in 6.0 transfers to BBCodeTranslatorUtil in 6.1

When I do migration from liferay version 6.0 to version 6.1. In one jsp, it uses BBCodeUtil.getHTML(MBMessage message). When I deploy the project, it gives me an error that "only a type can be imported". See my another blog about this error. It means we miss jars. But BBCodeUtil should be in root lib. Why does liferay can't recognize? The reason is in Liferay version 6.1, there's no class called BBCodeUtil. It's merged to BBCodeTranslatorUtil. 

Another thing is in BBCodeTranslatorUtil, methods are changed. It only provides API BBCodeTranslatorUtil.getHTML(String bbcode). So how can we get bbcode from MBMessage. We can do like this:

BBCodeTranslatorUtil.getHTML(message.getBody()) ===== BBCodeUtil.getHTML(message);

It works well. Try it..


For more info, see these:

http://docs.liferay.com/portal/6.1/javadocs-all/index.html?com/liferay/portlet/translator/util/package-tree.html(API)

http://www.liferay.com/community/forums/-/message_boards/message/12228500


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值