掲示板
Portlet Display
Hello,
I am developing a portlet and i want this portlet to be displayed if a certain value does not exist in the database, Is this possible? and is there a sample portlet i can look at
Thanks
Jubril
I am developing a portlet and i want this portlet to be displayed if a certain value does not exist in the database, Is this possible? and is there a sample portlet i can look at
Thanks
Jubril
11年前 に David H Nebinger によって更新されました。
RE: Portlet Display
Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
No.
The only flag at the liferay level is whether a user is logged in or not, but beyond that flags do not really control whether the portlet should be displayed or not.
I guess you could do something tricky like create a new role. Create the portlet and place it on the page, but only allow users with the given role to view the portlet. The tough part is then mucking around in the bowels of Liferay when the test is done to see if the user has a role to view a portlet - you'd have to inject your check against the database and, if the value is there, artificially grant the role to the user...
The only flag at the liferay level is whether a user is logged in or not, but beyond that flags do not really control whether the portlet should be displayed or not.
I guess you could do something tricky like create a new role. Create the portlet and place it on the page, but only allow users with the given role to view the portlet. The tough part is then mucking around in the bowels of Liferay when the test is done to see if the user has a role to view a portlet - you'd have to inject your check against the database and, if the value is there, artificially grant the role to the user...