Is there a way to get Spring MVC form names for portlets? I do not want to install
<requires-namespaced-parameters>false</requires-namespaced-parameters>
to get Spring mvc forms running under Liferay 6.2.
I was thinking of redefining Spring-taglib form so that it puts the portlet namespace prefix in front of the form field names / identifiers that are not actually trying to associate them with bean -properties with the namespace (which obviously won't work), but it seems very time consuming.
Does anyone know of a different way to solve this problem?
Here is an example form to show the exact problem:
<portlet:actionURL var="actionURL">
<portlet:param name="action" value="search"/>
</portlet:actionURL>
<form:form action="${actionURL}" commandName="searchSettings">
<form:input path="textField"/>
<form:input path="anotherTextField"/>
<input type="submit" value="Search"/>
</form:form>
And its corresponding bean will be:
public class SearchSettings {
private String textField;
private String anotherTextField;
}
This will not work in Liferay 6.2, since the input to the form is not replaced by names. They should be placed like this:
<c:set var="ns"><portlet:namespace/></c:set>
<form:input path="${ns}textField"/>
Spring
SearchSettings._namespace_portlet_textField
, , .
- , Spring MVCs Form-Taglib? , Spring JIRA (https://jira.springsource.org/browse/SPR-11176), .
.