RE: Alternative of Deprecated Parameter

Sanjay Bandhnaiya, modified 5 Years ago. New Member Posts: 5 Join Date: 12/24/19 Recent Posts
I have override LoginMVCActionCommand.

actionURL.setParameter(REDIRECT, redirect); // This line showing me warning as Deprecated 

 I have found that alternative is getRenderParameters().setValue() adn it is working but in log it is giving error that  Requires 3.0 opt-in.I have update property("javax.portlet.version=3.0") also but still giving me error.
thumbnail
David H Nebinger, modified 5 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts
Deprecated doesn't always mean "don't use this". If it is still there and has the desired effect, stick with it.

It can mean that what you are doing might break on a future version, but since it is a future version the whole thing might be completely reworked. So I wouldn't get hung up on that...
thumbnail
Enrique Valdes Lacasa, modified 5 Years ago. Junior Member Posts: 92 Join Date: 7/29/14 Recent Posts
Have you added the property
"javax.portlet.version=3.0"
only in the portlet class? I realized I had added it in my xxxMVCActionCommand by mistake and didn't work.Also, you need to add:
<%@ taglib uri="http://xmlns.jcp.org/portlet_3_0" prefix="portlet" %>
in your JSP init file.