Results 1 to 5 of 5

Thread: create.jspx

  1. #1

    Default create.jspx

    I changed a few fields not to render by giving render="false". Roo change the z value to "user-managed". I also changed a few to have require="false". Now, my form save does not work.

    Any ideas?

  2. #2
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    Roo will change the z attribute to user-managed as soon as you make a change to an element. This is to ensure that your changes are not lost for round tripping. Of course if you make changes to an element you are taking over responsibility to manage it yourself. See http://static.springsource.org/sprin...x.html#d4e1544 for details.
    Stefan Schmidt
    Software Engineer, Spring Roo
    SpringSource - a division of VMware
    twitter @schmidtstefan

  3. #3

    Default

    Stefan,

    I get that. However, the error was becuase of the BindingResult having errors. This gives the user nothing happened until you debug. I would rather that some error was displayed on the jsp.

    if (result.hasErrors()) {
    model.addAttribute("User", User);
    addDateTimeFormatPatterns(model);
    return "User/create";
    }
    Last edited by fastmap; Dec 8th, 2010 at 12:37 AM.

  4. #4
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    Actually, the errors instance is being passed on to the jsp and displayed there. Check the form:errors tag in input.jspx for example. To see it working just use one of the JSR 303 annotations (ie @Size(min=100) and violate in by entering a shorter value in the form. You will see the errors displayed in the form.
    Stefan Schmidt
    Software Engineer, Spring Roo
    SpringSource - a division of VMware
    twitter @schmidtstefan

  5. #5

    Default

    Ok. I had the field specified with "render = false"

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •