Elements inside element RRS feed

  • Question

  • Hi. Im traying to desing a model about scenes, there are related scenes, each scene is composed of componentes, there are shapes for each element.

    What I want when a run my project is than U wont be able to drop components outside scenes, only u can drop the components inside the scenes and the generate a xml file with this, each scene with its component and their relashiship.


    I really appreciate your help.

    Thursday, July 7, 2011 4:10 PM


  • Hi,

    Effectively, it's the default behavior.

    Scene domain class and Component domain class are certainly connected by using Embedding relationship.
    So, the defaut generated merge directives constraint drag and drop actions.

    To modify this behavior, You can change the relation between Scene domain class and Component domain class by using Reference relationship. To accomplish this, you must remove the previous relation. And the Component domain class must be connected with another embedding relationship (with root domain class...).


    Another solution will be to customize merge directives of the root model.

    Customizing Element Creation and Pasting


    If it's only an ui problem, you can customize the parent element used for the Component Shape.

    "...Has Custom Parent Shape.."




    Monday, July 11, 2011 11:10 AM