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

  • 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
    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.

    Comment


    • #3
      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, 12:37 AM.

      Comment


      • #4
        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.

        Comment


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

          Comment

          Working...
          X