留言板

Hook My Account Portlet

Syed Umair,修改在11 年前。

Hook My Account Portlet

Junior Member 帖子: 36 加入日期: 12-10-11 最近的帖子
Hi,
I want to perform some actions on change of Custom Fields available to user in My Account Portlet. I know it requires me to implement hook, but I don't know which file or service to hook. Can anyone guide me in this regard that how can I hook this portlet, so that I can perform required action whenever a user changes the custom field.

Any valuable comment will be appreciated. emoticon
Umair
thumbnail
David H Nebinger,修改在11 年前。

RE: Hook My Account Portlet

Liferay Legend 帖子: 14918 加入日期: 06-9-2 最近的帖子
Why do that when you could just add a model listener to intercept updates?
Syed Umair,修改在11 年前。

RE: Hook My Account Portlet

Junior Member 帖子: 36 加入日期: 12-10-11 最近的帖子
David H Nebinger:
Why do that when you could just add a model listener to intercept updates?



I have no idea about model listener. So, can you explain me a little that how could I detect change in custom fields using model listener.
Syed Umair,修改在11 年前。

RE: Hook My Account Portlet

Junior Member 帖子: 36 加入日期: 12-10-11 最近的帖子
Hey David, I have implemented the Model Listener for User to detect changes in Custom Attribute. But I get same Expando Values in onBeforeUpdate(User) and onAfterUpdate(User) methods. I am not sure that did expando changes reflect that user is updated??
Syed Umair,修改在11 年前。

RE: Hook My Account Portlet

Junior Member 帖子: 36 加入日期: 12-10-11 最近的帖子
Does anyone know the solution for my problem??? emoticon
Syed Umair,修改在11 年前。

RE: Hook My Account Portlet (答复)

Junior Member 帖子: 36 加入日期: 12-10-11 最近的帖子
I have implemented the Model Listener for ExpandoValue. Now, I am unable to get old values in onBeforeUpdate() method. can anyone suggest me how to get old values for my expando?
Syed Umair,修改在11 年前。

RE: Hook My Account Portlet (答复)

Junior Member 帖子: 36 加入日期: 12-10-11 最近的帖子
In case anyone else interested, I have get old data by
ExpandoValueLocalServiceUtil.getData()
method