-
Dec 6th, 2010, 06:19 PM
#1
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?
-
Dec 7th, 2010, 05:06 PM
#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.
-
Dec 7th, 2010, 11:53 PM
#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 at 12:37 AM.
-
Dec 7th, 2010, 11:58 PM
#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.
-
Dec 8th, 2010, 12:14 AM
#5
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
-
Forum Rules