Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
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 Go to next message
Pawel Zalejko is currently offline Pawel ZalejkoFriend
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 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
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?
Re: [EMF Forms] How to embed a model view inside another model view [message #1239850 is a reply to message #1239590] Wed, 05 February 2014 07:39 Go to previous messageGo to next message
Pawel Zalejko is currently offline Pawel ZalejkoFriend
Messages: 15
Registered: October 2013
Junior Member
Hi Jonas,

Thanks for your quick response. Basically, the "ReferencedView" is what I would like to use. Having two view models (and some reference between associated classes) I would like to somehow indicate that "here" EMF Forms should try tor find a matching view model for my referenced object.

index.php/fa/17405/0/

index.php/fa/17404/0/


Cheers

Pawel

[Updated on: Wed, 05 February 2014 08:28]

Report message to a moderator

Re: [EMF Forms] How to embed a model view inside another model view [message #1239923 is a reply to message #1239850] Wed, 05 February 2014 10:26 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,

OK, to make it very clear, you would not use a control in this case, but
another (new) view model element called "ReferencedView", right?
Would you mind to enter a feature request for this?

Regards

Jonas

Am 05.02.2014 08:39, schrieb Pawel Zalejko:
> Hi Jonas,
>
> Thanks for your quick response. Basically, the "ReferencedView" is what I would like to use. Having two view models (and some reference between associated classes) I would like to indicate somehow that "here" EMF Forms should try tor find a matching view model for my referenced object.
>
>
>
>
> Cheers
>
> Pawel
>
Re: [EMF Forms] How to embed a model view inside another model view [message #1239939 is a reply to message #1239923] Wed, 05 February 2014 10:53 Go to previous messageGo to next message
Pawel Zalejko is currently offline Pawel ZalejkoFriend
Messages: 15
Registered: October 2013
Junior Member
Hi,

yes, something like that:

index.php/fa/17406/0/


I'll enter a new ticket for this.

EDIT: Ticket created: https://bugs.eclipse.org/bugs/show_bug.cgi?id=427458

Thanks!

[Updated on: Wed, 05 February 2014 12:12]

Report message to a moderator

Re: [EMF Forms] How to embed a model view inside another model view [message #1240344 is a reply to message #1239939] Thu, 06 February 2014 09:05 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Thanks for clarifying, could you post the link to the BR?

Am 05.02.2014 11:53, schrieb Pawel Zalejko:
> Hi,
>
> yes, something like that:
>
>
>
>
> I'll enter a new ticket for this.
>
> Thanks!
>
Re: [EMF Forms] How to embed a model view inside another model view [message #1240371 is a reply to message #1240344] Thu, 06 February 2014 10:01 Go to previous message
Pawel Zalejko is currently offline Pawel ZalejkoFriend
Messages: 15
Registered: October 2013
Junior Member
https://bugs.eclipse.org/bugs/show_bug.cgi?id=427458

Regards
Pawel

[Updated on: Thu, 06 February 2014 10:02]

Report message to a moderator

Previous Topic:[EEF] How to Generate Multiple Tabs
Next Topic:[Edapt] DiagnosticException on an example migration
Goto Forum:
  


Current Time: Sat Mar 06 23:44:19 GMT 2021

Powered by FUDForum. Page generated in 0.02515 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top