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

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 … Continue reading Liferay diaries: Help! My validation errors are not showing!

Liferay diaries: Help! My form post parameters are empty!

While hacking a Spring & Liferay prototype, I'm suddenly wondering about why during a form submission there are no parameters (not even empty or null) submitted by the form. Turns out that I got bitten once more by the two phases of the portlet lifecycle [1] and naivly were handling form submission in the handleRenderRequest … Continue reading Liferay diaries: Help! My form post parameters are empty!

Liferay diaries: Directing between different portlets on different pages

In my latest project I've came across the following UI construct: A portlet with a search form displays results. When the user clicks on one of the result entries, a detail view should be shown which however resides in a different portlet... on a different page. Surprisingly, the solution revolves around craftly constructing the right … Continue reading Liferay diaries: Directing between different portlets on different pages

Liferay diaries: Multiple spring form controllers in a portlet

Now there comes a moment in the life of every portlet author, be it a seasoned veteran (like jstam) or a fresh starter like myself when you need to do implement something out of the ordinary for which portlets were not intended. Last week we had to scetch up an all-in-one portlet that could display … Continue reading Liferay diaries: Multiple spring form controllers in a portlet

Liferay diaries: Log4j

Setting up log4j for a Liferay and Spring application is easy: in /WEB-INF/log4j.properties log4j.category.org.springframework=DEBUG,console And some entries in web.xml <context-param> <param-name>log4jConfigLocation</param-name> <param-value>/WEB-INF/log4j.properties</param-value> </context-param> <listener> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> </listener>

Liferay diaries: Serving resources from a portlet with Spring

So there comes the day when you finally have to serve an image, pdf or excel report generated by a portlet or, more elegantly, by a Spring controller backing a portlet. At a first take this may seem impossible since the markup produced by a portlet is embedded in the markup (i.e. HTML) of all … Continue reading Liferay diaries: Serving resources from a portlet with Spring