Grails - combine errors in command object and subobjects -


i checked out grails: how combine domain objects' errors command objects' errors?, reason solutions aren't working me. it's possible they're grails 1.3.7 , not grails 2.2.1.

i have command object outerobjectcommand contains list of innerobjectcommand. i'm populating manually in controller, , calling validate. calling validate() on outerobjectcommand not appear validating innerobjectcommand list, validate elements of list separately. want add errors of innerobjectcommand objects , outerobjectcommand object flash.errors. how can this?

have @ last example in validator page.

vaguely, need below:

class parentcommand {     list<childcommand> childcommands     static constraints = {         childcommands validator: {val, obj ->             def errors = []             val.each{                  errors << (!it.validate() ? it.errors.allerrors : [])             }              errors?.flatten()         }     } } 

Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -