Announcement Announcement Module
Collapse
No announcement yet.
Binding a RequestParam Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Binding a RequestParam

    Hi,
    I am trying to use my custom PropertyEditorSupport editor as a converter of url variables to the correct object.
    I have the following code
    Code:
        @RequestMapping("/secure/editInvoice_getAllPeopleInCompany.htm")
        public String getAllPeopleInCompany(ModelMap model,
                @RequestParam("company") Company company) {
            model.put("users", company.getUserIdCollection());
            return "secure/ajaxReturnObject";
        }
    However I get a
    org.springframework.web.util.NestedServletExceptio n: Request processing failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert value of type [java.lang.String[]] to required type [se.xxx.invoice.classes.Company];
    error.
    The editor works great when form posting and other binding.

    How would I do this the best way?

    Regards,
    Jonas
Working...
X