Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Syed Umair
Hook My Account Portlet
November 15, 2012 10:17 PM
Answer

Syed Umair

Rank: Junior Member

Posts: 36

Join Date: October 11, 2012

Recent Posts

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
David H Nebinger
RE: Hook My Account Portlet
November 15, 2012 10:48 PM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7917

Join Date: September 1, 2006

Recent Posts

Why do that when you could just add a model listener to intercept updates?
Syed Umair
RE: Hook My Account Portlet
November 15, 2012 10:56 PM
Answer

Syed Umair

Rank: Junior Member

Posts: 36

Join Date: October 11, 2012

Recent Posts

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
RE: Hook My Account Portlet
November 16, 2012 2:13 AM
Answer

Syed Umair

Rank: Junior Member

Posts: 36

Join Date: October 11, 2012

Recent Posts

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
RE: Hook My Account Portlet
November 16, 2012 3:02 AM
Answer

Syed Umair

Rank: Junior Member

Posts: 36

Join Date: October 11, 2012

Recent Posts

Does anyone know the solution for my problem??? emoticon
Syed Umair
RE: Hook My Account Portlet
November 16, 2012 3:31 AM
Answer

Syed Umair

Rank: Junior Member

Posts: 36

Join Date: October 11, 2012

Recent Posts

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
RE: Hook My Account Portlet
November 16, 2012 5:29 AM
Answer

Syed Umair

Rank: Junior Member

Posts: 36

Join Date: October 11, 2012

Recent Posts

In case anyone else interested, I have get old data by
1ExpandoValueLocalServiceUtil.getData()
method