NullPointerException using liferay-ui taglib

只愿长相守 提交于 2019-12-07 16:57:33

问题


I'm trying to use the liferay-ui:icon-help tag in my (Liferay 6.1) portlet, but adding

<liferay-ui:icon-help message="help me"/>

to my edit.jsp gives me

ERROR [render_portlet_jsp:154] java.lang.NullPointerException at com.liferay.taglib.ui.IconHelpTag.processEndTag(IconHelpTag.java:57)

I'm sure I imported the taglib correctly because other tags such as liferay-ui:calendar work just fine.

Did I forget anything?

edit: IconHelpTag.java:57 suggests that there's something wrong involving the theme, but I did not play around with that, the server is pretty much as it came out of the box.


回答1:


Looks like the liferay-ui:icon-help tag makes call to a theme related object, add the following lines to your jsp:

<%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme"%>
<liferay-theme:defineObjects />


来源:https://stackoverflow.com/questions/10811498/nullpointerexception-using-liferay-ui-taglib

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!