掲示板

permissionChecker cannot be resolved

12年前 に Daniel Mueller によって更新されました。

permissionChecker cannot be resolved

New Member 投稿: 12 参加年月日: 11/11/10 最新の投稿
I am trying to use the permissionChecker in a custom portlet but I can't get it to work.

I am having this
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>

followed by this:
<portlet:defineobjects />

in my JSP. But when I try to use this:
     
if (permissionChecker.hasPermission(
            scopeGroupId, "com.liferay.portlet.blogs.model",
            scopeGroupId, "ADD_ENTRY")) {
    	 
}


it lights up like a christmas tree: permissionChecker and scopeGroupId cannot be resolved. However, when I remove
<portlet:defineobjects />

I get even more errors, e.g. renderResponse cannot be resolved anymore.

My LR version is 6.0.6
thumbnail
12年前 に Sandeep Nair によって更新されました。

RE: permissionChecker cannot be resolved

Liferay Legend 投稿: 1744 参加年月日: 08/11/06 最新の投稿
<%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %>

<liferay-theme:defineObjects />

Add the above plz

Regards,
Sandeep
12年前 に Daniel Mueller によって更新されました。

RE: permissionChecker cannot be resolved

New Member 投稿: 12 参加年月日: 11/11/10 最新の投稿
Sandeep Nair:
<%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %>

<liferay-theme:defineObjects />

Add the above plz

Regards,
Sandeep


brilliant, that solved it for me. didn't realize that there are multiple "defineObject" methods. Thanks alot!