Hi, When using free marker the model is exposed as free marker objects not request attributes. That's why the spring taglib can't find them.
You can customize the freemarker renderer to have it do this. Another alternative is to use springs freemarker macros instead. See http://static.springsource.org/spring/docs/2.5.x/reference/view.html#view-velocity-forms for more details. There's also of course the possibility of using a JSP for this view. // Tobias On Jan 25, 2012, at 12:03 PM, Magnolia Forums (on behalf of Michael Thoden) wrote: > Hi, > > I'm trying to use the Spring Data-Binding with a blossom Template. > In the controller I'm adding my Command-Object to the Moddel-Map: > model.addAttribute("command", command); > But if I try to access the Command-Object by my Spring-Form: > <@form.form commandName="command" method="POST"> > I always get the error: > javax.servlet.ServletException: > org.springframework.web.util.NestedServletException: Request processing > failed; nested exception is info.magnolia.module.templating.RenderException: > Can't render template /templates/[......].ftl: IllegalStateException: Neither > BindingResult nor plain target object for bean name 'command' available as > request attribute > > If I forward the command-object by an Reqest-Attribute the form is show but > the data-binding is not working correctly because the Command-Object is > created from scratch within the databinding and all field that are not in the > form become null. > > Is there something wrong with my data-binding? > > Thank you and regards, Michael > > -- > Context is everything: > http://forum.magnolia-cms.com/forum/thread.html?threadId=9bd8d683-1dd0-4602-a84b-cc518d3c815a > > > ---------------------------------------------------------------- > For list details, see http://www.magnolia-cms.com/community/mailing-lists.html > Alternatively, use our forums: http://forum.magnolia-cms.com/ > To unsubscribe, E-mail to: <[email protected]> > ---------------------------------------------------------------- ---------------------------------------------------------------- For list details, see http://www.magnolia-cms.com/community/mailing-lists.html Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
