留言板

how to get Current pageId details in the portal services overrided class

thumbnail
Raju oukanti,修改在10 年前。

how to get Current pageId details in the portal services overrided class

Regular Member 帖子: 143 加入日期: 12-2-21 最近的帖子
Hi Guys,


I am overriding the getUserRoles() method of Role class through hook by extending the RoleLocalServiceWrapper class.In this method i need the current pageId details.So please help me how to get it .And also please provide the details how to make availability of themedisplay object or request object in this respective class.


Thanks,
Raju
thumbnail
David H Nebinger,修改在10 年前。

RE: how to get Current pageId details in the portal services overrided clas

Liferay Legend 帖子: 14916 加入日期: 06-9-2 最近的帖子
You cannot get them. They are not connected.

Saving or retrieving data (especially user roles) happens at many points in Liferay, some of whom are not connected to a particular page (i.e. the web services, liferay authentication, administration via the control panel, etc.).

You are trying to bind the retrieve of data to a page id (probably you have some sort of weird idea that you'll return a different set of roles if a user is on a page), but in effect you are going to break your liferay as a result.

Instead of trying your own messed up idea, why not try asking how you would accomplish a particular task and let experienced people chime in on how to do it?