-
Aug 8th, 2009, 06:32 PM
#1
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
#2
@vamsi06
If you take a look at the clinic.roo sample application we ship with Roo you can see how it currently works:
Code:
roo> script clinic.roo
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.
-Stefan
-
Aug 12th, 2009, 01:52 PM
#3
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules