Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » [EMF Forms] How to embed a model view inside another model view(reuse existing view model )
[EMF Forms] How to embed a model view inside another model view [message #1239138] |
Mon, 03 February 2014 13:08 |
Pawel Zalejko Messages: 15 Registered: October 2013 |
Junior Member |
|
|
Hi,
I Recently started evaluating EMF Forms framework and at first glance it looks really interesting. When I was playing with it I ran into one problem: how to embed (or rather use) an existing view model inside another one?
For instance, let's assume that we have two classes: (A) and (B). Class (A) has a reference to the (B). I create two view models which show (A) and (B) respectively. Now, I would like to embed the (B)'s view model within the (A)'s view model. As a result, after showing the (A) I should get all details of the (A) and also everything what is declared within the (B)'s view model.
Could you tell me how can I do that?
[Updated on: Mon, 03 February 2014 13:09] Report message to a moderator
|
|
|
Re: [EMF Forms] How to embed a model view inside another model view [message #1239590 is a reply to message #1239138] |
Tue, 04 February 2014 14:44 |
Jonas Helming Messages: 699 Registered: July 2009 |
Senior Member |
|
|
Hi,
Is the reference between A and B a 1-1 containment? If so, it is
possible to reference attributes of B in the View model of A. However,
in this case, you would need to descriptions of the B view, one
stand-alone, one embedded. If they are exactly the same, this would mean
duplication. We did not have this case before. A potential solution
would be to introduce a new element, which is called "ReferencedView"
which can be contained somewhere in the view model tree. This reference
would need to define the path from the root (A) to B. The renderer would
search for a view model of B and embbed it.
Cheers
Jonas
Am 03.02.2014 14:08, schrieb Pawel Zalejko:
> Hi,
>
> I Recently started evaluating EMF Forms framework and at first glance it
> looks really interesting. When I was playing with it I ran into one
> problem: how to embed (or rather use) an existing view model inside
> another one?
> For instance, let's assume that we have two classes: (A) and (B). Class
> (A) has a reference to the (B). I create two view models which show (A)
> and (B) respectively. Now, I would like to embed the (B)'s view model
> within the (A)'s view model. As a result, after showing the (A) I should
> get all details of the (A) and also everything what is declared within
> the (B)'s view model.
>
> Could you tell me how can I do that?
|
|
| | | | | |
Goto Forum:
Current Time: Tue Mar 19 05:03:37 GMT 2024
Powered by FUDForum. Page generated in 0.02091 seconds
|