Changeset 1225

Show
Ignore:
Timestamp:
30-11-10 17:26:24 (3 years ago)
Author:
work@…
Message:

- resolved issue #223

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/dbnp/studycapturing/WizardController.groovy

    r1180 r1225  
    922922                        } 
    923923 
     924                        // Grails tends to dynamically load objects. This is a nice 
     925                        // feature, but can cause problems (see ticket #223) as objects 
     926                        // get instantiated multiple times which causes the POST variable 
     927                        // to have a different 'identity' as the actual instances. The 
     928                        // workaround is to 'touch' them here so they get instantiated: 
     929                        study.hasMany.each { name, type -> 
     930                                // dynamically instantiate all identity classes 
     931                                if (type.toString() =~ "dbnp.studycapturing") { 
     932                                        study.getProperty( name ).each { } 
     933                                } 
     934                        } 
     935 
     936                        // store study in the flowscope 
    924937                        flow.study = study 
    925938