Thank you Tobias,
For some strange reason when I tried doing that I got a weird Spring error
at runtime when I try to actually try to use the object in a class:

BeanInstantiationException: Could not instantiate bean class
[javax.jcr.Node]: Specified class is an interface
code looks something like :

 @RequestMapping(value = "/foo/path}", method = RequestMethod.POST)
    public String fooPost(Node node, ...)


..
 PropertyIterator propertyIterator = node.getProperties();
..
}


I was able to get my code to work but I had to switch to using
 mgnlVersioningSession.getNode()  instead

--
biz: http://www.linkedin.com/in/vincentstoessel/
personal: http://xaymaca.tumblr.com/


On Thu, Aug 29, 2013 at 4:02 AM, Tobias Mattsson (via Magnolia Forums) <
[email protected]> wrote:

> Hi Vincent,
>
> Blossom has a WebArgumenResolver that makes is possible to get the content
> as an argument to your @RequestMapping methods.
>
> It's configured in blossom-servlet.xml like this:
>
>   <bean
> class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
>     <property name="customArgumentResolver">
>       <bean
> class="info.magnolia.module.blossom.web.BlossomWebArgumentResolver" />
>     </property>
>   </bean>
>
> And used like this:
>
>     @RequestMapping("/bookcategory")
>     public String render(ModelMap model, Node content) throws
> RepositoryException { ... }
>
> Or if you also need access to the page content, you can add two arguments
> of type Node, then the first will be the page and the second the content of
> the component.
>
>     @RequestMapping("/bookcategory")
>     public String render(ModelMap model, Node page, Node content) throws
> RepositoryException { ... }
>
> Hope that helps!
>
> // Tobias
>
> --
> Context is everything:
> http://forum.magnolia-cms.com/forum/thread.html?threadId=a0450c46-0526-4ce2-a2ab-efe3b98297f8
>
> You are invited to Magnolia Conference. Less than a month to go! Register
> now: http://www.magnolia-cms.com/conference/register.html
>
>
> ----------------------------------------------------------------
> 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]>
----------------------------------------------------------------

Reply via email to