Results 1 to 4 of 4

Thread: Creating composite relation

  1. #1
    Join Date
    Aug 2004
    Location
    The Netherlands
    Posts
    160

    Default Creating composite relation

    Hi,
    I am trying to figure out if it is possible to create a composite relationship. When typing 'hint relationships' the example of order - orderline is given. If I understand correct you need two controller to handle this relationship in the front end. You get two forms, one for the order and one for de orderline.

    Is it possible to create something that lets you create an orderline right from the order form? I do not want to let de user go to a different page to add orderlines.

    Any ideas?

    thanks
    Jettro Coenradie
    http://www.gridshore.nl

  2. #2
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    Hi,

    Indeed merging the handling of two separate entities which are related to each other through a single controller and view artefacts is currently not implemented. I imagine that this can become somewhat cumbersome if you have deeper nested objects such as Order -> OrderLine -> Product -> Manufacturer. If you want to manage all of these relationships through a single controller and view that would be hard to lay out.

    Now you can overcome this by using some JS magic to use overlay forms but we also need to keep in mind that JS may be disabled by the user while the form should still be usable. I have written a small sample project which demonstrate the Spring integration with Dojo to accomplish this for an Account -> Investment relationship (http://tinyurl.com/n2hmld). Source code for this sample is available here: http://tinyurl.com/nke2u9.

    I am happy about any suggestions on how this could be handled by Roo. Please open a Jira ticket and note your ideas!

    Thanks,
    Stefan

  3. #3
    Join Date
    Aug 2004
    Location
    The Netherlands
    Posts
    160

    Default

    Ik can understand it would not be easy if you go the path like your example suggests. Of course the orderline - Product will not be a composition. But I get the point

    I am just starting with ROO, when I get my head straight and played around with ROO I'll think about the problem and how to embed this kind of a solution in ROO. Than I'll add it to jira :-)

    Your example looks very promising, I am definitely going to try it out.

    thanks
    Jettro Coenradie
    http://www.gridshore.nl

  4. #4
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    Hi,

    Sorry for the bad example . Yes, please play with it a little and let us know what would work for you.

    -Stefan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •