The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

conscience (1) [Avatar] Offline
#1
Hi all,

this book is awesome but I think there might be a problem with the validation stuff.

On Page (in the pdf) 187 section 7.4.2 there only is:
public String addSpitterFromForm(@Valid Spitter spitter, BindingResult bindingResult) ...
But that not worked for me ... after a short search I figured out, that there is '@ModelAttribute("...")' before the valid tag missing. After I added this it works like a charm ... another thing is some pages earlier where the model attribute is set, that is done by the simple addAttribute method, without the string for the model attribute name, that also did not work for me, but I have no idea why that not worked.

Ehmm yea very sorry for my bad english -.-

But I hope some can give me a hint why thats things work or not work properly.

Message was edited by: added some highlighting of the code snippets
conscience