Announcement Announcement Module
Collapse
No announcement yet.
How to create a controller/jsp for a one to many relationship? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #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

    Comment


    • #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.

      Comment

      Working...
      X