Hi,
I'm trying to use portlet MVC annotation based, but I get some trouble if I want to use @ActionMapping !
in my jsp I've got :
In my controller :Code:... <portlet:defineObjects/> <portlet:actionURL name="showClientForm" var="clientFormUrl"/> <a href="${clientFormUrl}">add client</a> ...
When I click on the link from the jsp, goToForm method is called, but it fail to show the view with the following error :Code:... @ActionMapping("showClientForm") public String goToForm(Model model) { log.info("method goToForm"); model.addAttribute("client", new ClientImpl()); return "formClient"; }
How to solve that ?Code:16:03:15,751 ERROR [DispatcherPortlet:559] Could not complete request java.lang.IllegalStateException: Invalid action method return value: ModelAndView: reference to view with name 'formClient'; model is {client={clientId=0, companyId=0, userId=0, userName=, createDate=null, modifiedDate=null, firstName=, lastName=}, org.springframework.validation.BindingResult.client=org.springframework.validation.BeanPropertyBindingResult: 0 errors} at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.handleAction(AnnotationMethodHandlerAdapter.java:282) at org.springframework.web.portlet.DispatcherPortlet.doActionService(DispatcherPortlet.java:641) at org.springframework.web.portlet.FrameworkPortlet.processRequest(FrameworkPortlet.java:519) at org.springframework.web.portlet.FrameworkPortlet.processAction(FrameworkPortlet.java:460) at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:70) at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:48) at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:92) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) ...
I'm using Liferay 6.0.6 and my application is deployed with the plugin SDK.
Regards


Reply With Quote
