掲示板

Hook My Account Portlet

11年前 に Syed Umair によって更新されました。

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
11年前 に David H Nebinger によって更新されました。

RE: Hook My Account Portlet

Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
Why do that when you could just add a model listener to intercept updates?
11年前 に Syed Umair によって更新されました。

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.
11年前 に Syed Umair によって更新されました。

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??
11年前 に Syed Umair によって更新されました。

RE: Hook My Account Portlet

Junior Member 投稿: 36 参加年月日: 12/10/11 最新の投稿
Does anyone know the solution for my problem??? emoticon
11年前 に Syed Umair によって更新されました。

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?
11年前 に Syed Umair によって更新されました。

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