Announcement Announcement Module
No announcement yet.
@ModelAttribute not setting values Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • @ModelAttribute not setting values

    Hi All,

    I am using ExtJs with Spring3 REST.

    So I designed a form in ExtJs.
    Following is the signature of my update method at controller
    @RequestMapping(value = "/datatypes/{dataTypeId}", method = RequestMethod.PUT)
    public String update(	@ModelAttribute("dataType") DataType dataType,
    				@PathVariable("dataTypeId") long id)
    At Controller I am using @ModelAttribute so that all values of form is saved in my bean.
    But, when form is submitted with method = "PUT"
    I get no values in my bean.

    After some search, I found out that
    For @ModelAttribute to work we have to use
    Springs form tag with "modelAttribute" property

    So, how can I use @ModelAttribute feature with ExtJs, as ExtJs creates simple form tag.

    Is there some trick to use it.

    Note : In web XML I have also included filters for Spring 3 REST Support
    	<!-- required to enable Spring 3.0 REST support -->