Liferay diaries: Help! My validation errors are not showing!

Posted on 17/10/2011 by George Georgovasilis

While still battling form submissions in my Liferay/Spring MVC Form controller/Multi-portlet beast, I noticed that the Spring form tags would not display errors. As this post [1] explains, the reason is that the form backing object must be named exactly as the class consituting the backing object, but with the first letter in lowercase.

Thus the jsp:

<form:form action="..." cssClass="acsform" commandName="searchDeliveryQuery">
...

must match the controller:

    @RenderMapping
    public String view() {
        return "searchDeliveries";
    }

[1] Stackoverflow

http://stackoverflow.com/questions/1363753/spring-mvc-formerrors-tag-doesnt-find-error-messages

This entry was posted in Liferay, portlet, spring and tagged by George Georgovasilis