Aug 8th, 2009, 06:32 PM
How to create a controller/jsp for a one to many relationship?
First off, great work on a fantastic framework! I started off my latest project with spring roo. My data model has a a one-to-many relationship.
Subscriber --> Addresses
When I use the below command it generated a page which creates the entity from a many-to-one perspective i.e I can assign a user to an address. I want to create multiple addresses in the same page as I create the user. How do I achieve this? Should I completly customize the behavior or is there some way I can have roo generate this controller & page for me?
Here is my controller: new controller automatic ~.web.SubscriberController -formBackingObject ~.domain.Subscriber
Aug 11th, 2009, 01:27 AM
If you take a look at the clinic.roo sample application we ship with Roo you can see how it currently works:
However, in-page creation of related / referenced entities is currently not supported. We have been thinking about this and it would be possible to do with Spring JS and a popup form. You can create a Jira feature request ticket and provide some thoughts if you wish.
roo> script clinic.roo
Aug 12th, 2009, 01:52 PM
Ok. Thanks. I will submit a feature request. Also, how do I complete erase all roo dependency from my project if I so choose? The website says I can do it within 4 clicks. I haven't found any related documentation.