RE: Liferay 7.3 - StrutsAction for update_terms_of_use

Chanakya P, modified 2 Years ago. Junior Member Posts: 72 Join Date: 2/17/14 Recent Posts

Hi Team,

 

I want to implement StrutsAction for update_terms_of_use in Liferay 7.3.

 

Can any one help me out, How to implement in Liferay 7.3

thumbnail
Sergio Sanchez, modified 4 Years ago. Regular Member Posts: 149 Join Date: 7/6/11 Recent Posts

If you need just to change the text of Terms of Use, point in Instance Settings to a different Web Content as explained here: https://learn.liferay.com/dxp/latest/en/system-administration/configuring-liferay/virtual-instances/instance-configuration.html#terms-of-use

Chanakya P, modified 2 Years ago. Junior Member Posts: 72 Join Date: 2/17/14 Recent Posts

Thanks for your reply.

I want override StrutsAction for /portal/update_terms_of_use in 7.3 version.

Trying to migrate StrutsAction Hook from 7.0 to 7.3 for /portal/update_terms_of_use.

Note:

I overriden BaseStrutsAction for /portal/update_terms_of_use in 7.0 version.

BaseStrutsAction is deprecated in 7.3 version.

Instead of BaseStrutsAction I used StrutsAction (in 7.3) but i was unable find actionhelper to process next.

Can you please help me out 

thumbnail
Olaf Kock, modified 4 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts

What did /portal/update_terms_of_use actually do? And what custom feature did you implement in your own extension?

If you ask in terms of what you're trying to achieve rather than what technical solution you have, we can point you to a solution easier.

Chanakya P, modified 2 Years ago. Junior Member Posts: 72 Join Date: 2/17/14 Recent Posts

Thanks for your reply.

I want store timestamp in custom field of user entity when user click on I Agree button terms of  use screen.

In 7.0 version, overriden BaseStrutsAction for /portal/update_terms_of_use.

BaseStrutsAction is deprecated in 7.3 version.

Instead of BaseStrutsAction I used StrutsAction in 7.3 but when user click on I Agree button terms of  use screen then it is showing white screen. it is not going to next.

thumbnail
Olaf Kock, modified 4 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts

With that, I'd say: Identify what the current implementation is and override that. Chances are that it's a MVCAction, but I haven't looked at it.
You could also introduce a UserLocalServiceWrapper that checks for modifications of the field and persists your custom field then and there.

Or run a daily job to determine whose acceptance status has changed since the last time the script ran, and write that timestamp. It doesn't correspond with the exact time of acceptance, but with the day.

Chanakya P, modified 2 Years ago. Junior Member Posts: 72 Join Date: 2/17/14 Recent Posts

To implement this one by using MVCActionCommand what is the value i need to use for javax.portlet.name property.

 

Chanakya P, modified 2 Years ago. Junior Member Posts: 72 Join Date: 2/17/14 Recent Posts

To implement this one by using MVCActionCommand what is the value need to use for javax.portlet.name property.

thumbnail
Eric D, modified 4 Years ago. Junior Member Posts: 59 Join Date: 3/25/16 Recent Posts

Hello Chanakya,

BaseStrutsAction is deprecated but not replaced everywhere.

In your case it is not replaced by a MVCComand may be you can do like before. Check this 7.3 example :

https://github.com/liferay/liferay-blade-samples/tree/7.3/liferay-workspace/extensions/struts-action-override

Eric.