Friday, August 22, 2014

Liferay 6.2 changes - Portlet namespace in Spring MVC

In Liferay 6.2 version when we submit any form data it returns always "no-param", which means, the actionRequest.getParameter() return null.

Also, at the time of migrating annotation based spring portlet from 6.1 to 6.2.10 then we can receive null parameter with actionURL at controller side. [JSP > FORM > SUBMIT ACTION URL  > CONTROLLER > ALL PARAMETERS NULL ]

How to fix this?

we need to put a namespace prefix to your name value like this:-
 <input type="text" name="<portlet:namespace />inputTextName" />  

or

we can set the requires-namespaced-parameters setting to false in your liferay-portlet.xml.
 <requires-namespaced-parameters>false</requires-namespaced-parameters>  

This is a change since Liferay 6.2:  https://github.com/liferay/liferay-aui-upgrade-tool/issues/30




1 comment:

  1. Hi.
    I found problems with this recently.
    If you are using spring forms the first way not works. Actual Spring version does not yet support for this.

    regards

    ReplyDelete

Popular Posts