问题
I create my portlet with Liferay (sdk 6.1), by deploy the portlet gets some default resource-actions, but I need some actions more. Because I want implement some complex permission based portlet. And I don't want create a Ext-Plugin to customize '../resource-actions/default.xml'.
回答1:
Did you see this liferay wiki post and this SO question. If you did and those were not helpful please give more details.
回答2:
You can set your own user action permissions on the portlet you have created. This code will come to the rescue:
ResourcePermissionLocalServiceUtil.setResourcePermissions(themeDisplay.getCompanyId(),"portlet_name",ResourceConstants.SCOPE_INDIVIDUAL,(String)Iframe_prim_key, new String[]{ActionKeys.VIEW});
Check the same at this link
来源:https://stackoverflow.com/questions/9445894/is-it-possible-in-liferay-to-add-custom-resource-actions-to-my-portlet