掲示板

show a message in jsp only if user can config the page

10年前 に Paolo Pilitti によって更新されました。

show a message in jsp only if user can config the page

Junior Member 投稿: 51 参加年月日: 11/04/13 最新の投稿
hi all

didnt find a solution.

i want to show a message in view.jsp to user if he /she can configure the portlet and the portlet isnt still configured.

something like

if user can configure AND portlet isn't configured
show message "please configure the portlet"

regards

Paolo
thumbnail
10年前 に Sagar A Vyas によって更新されました。

RE: show a message in jsp only if user can config the page

Liferay Master 投稿: 679 参加年月日: 09/04/17 最新の投稿
I am bit confuse with you requirement.

You want to display error message on your view of portlet in case anything goes wrong in configuration of that portlet ? or
You want display message [Informative] to end use that he has to configure portlet in order to use it ?

Let me know.

Thanks,
Sagar Vyas
10年前 に Paolo Pilitti によって更新されました。

RE: show a message in jsp only if user can config the page

Junior Member 投稿: 51 参加年月日: 11/04/13 最新の投稿
i meant the second that you wrote...

regards

Paolo
thumbnail
10年前 に Pankaj Kathiriya によって更新されました。

RE: show a message in jsp only if user can config the page

Liferay Master 投稿: 722 参加年月日: 10/08/05 最新の投稿
Below method may be helpful to you to check if current user have specific permission on portlet :

PortletPermissionUtil.contains(PermissionChecker permissionChecker, String portletId,	String actionId)
thumbnail
10年前 に Alessio Vezzoni によって更新されました。

RE: show a message in jsp only if user can config the page

New Member 投稿: 13 参加年月日: 13/02/28 最新の投稿
You can use the permission checker as Pankaj Kathiriya has written for checking the permissions and then read your portlet preferences for checking if your portlet is already configured.

This link may be useful for understanding how to read and write the portlet preferences https://www.liferay.com/it/documentation/liferay-portal/6.2/development/-/ai/implementing-configurable-portlet-prefer-liferay-portal-6-2-dev-guide-03-en

Regards