Hi,
I've been playing with Grails for a bit now and in spite of reading the documentation and searching online, I'm kind of stuck on how to do the following:
Consider 3 domain classes, each with its own controller, actions and view.
Domain 3 has a couple of attributes which should be dependant of the other 2 domains.
When using the Create action for domain 3, the view form should include drop-down lists for those couple attributes, and the dropdown lists should be populated with data from domains 1 and 2.
What is the best way of doing this? I've read about chains and redirects, and there is also the possibility of working the view in domain 3 and include select code thereto obtain info fromdomains 1 and 2.
It would seem cleaner to me though if the view were to beleft alone in terms of logic, and that the controllers and actions themselves would relate.
Can anyone help, I hope I have managed to properly lay it thesituation.
I've been playing with Grails for a bit now and in spite of reading the documentation and searching online, I'm kind of stuck on how to do the following:
Consider 3 domain classes, each with its own controller, actions and view.
Domain 3 has a couple of attributes which should be dependant of the other 2 domains.
When using the Create action for domain 3, the view form should include drop-down lists for those couple attributes, and the dropdown lists should be populated with data from domains 1 and 2.
What is the best way of doing this? I've read about chains and redirects, and there is also the possibility of working the view in domain 3 and include select code thereto obtain info fromdomains 1 and 2.
It would seem cleaner to me though if the view were to beleft alone in terms of logic, and that the controllers and actions themselves would relate.
Can anyone help, I hope I have managed to properly lay it thesituation.