PDA

View Full Version : MultiactionController and command object


CuriousHARD
Jun 14th, 2007, 02:45 AM
hi

i m using multiactioncontroller.. and i want to have a command object as i have a form to work with ,,,

i also check the docs i got a way inwhich i found an option that my handleing method can have a command object... but i dont know how to bind it in the form and how to make available in jsp page

i want to use form:form ... form:input like tags to make jsp readable.. i added <form:form commandName="myUser" >

<form:input path=""/>
..
..
..
</form:form>

but i got exception

- Neither Errors instance nor plain target object for bean name 'quotation' available as request attribute
java.lang.IllegalStateException: Neither Errors instance nor plain target object for bean name 'quotation' available as request attribute
...
...
..



another issue thats i m facing is that multiactioncontroller required an extra parameter having method name....

it is being used as hidden parameter in jsp but at the start i have to set first method name... now scenario is that i have a href link to call the first method (for page display) and i dont want to attach this parameter with url....

what could be the other option......

i think the problems are a little bit complex but understandable....
thanks in advance.....

Jörg Heinicke
Jun 14th, 2007, 12:22 PM
Hmm, isn't MultiActionController supposed to work like Ruby on Rails or other frameworks like that? There it is a principle to use a part of the URL as method name to do convention over configuration. So not passing this in the URL just means not using MultiActionController as far as I understand it - or at least not using a MethodNameResolver based on it.

Jörg