Skip to main content



      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 08:08 Go to next message
Eclipse UserFriend
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 08:09] by 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 09:44 Go to previous messageGo to next message
Eclipse UserFriend
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 02:39 Go to previous messageGo to next message
Eclipse UserFriend
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 03:28] by 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 05:26 Go to previous messageGo to next message
Eclipse UserFriend
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 05:53 Go to previous messageGo to next message
Eclipse UserFriend
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 07:12] by 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 04:05 Go to previous messageGo to next message
Eclipse UserFriend
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 05:01 Go to previous message
Eclipse UserFriend
https://bugs.eclipse.org/bugs/show_bug.cgi?id=427458

Regards
Pawel

[Updated on: Thu, 06 February 2014 05:02] by Moderator

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


Current Time: Tue Jul 08 06:02:55 EDT 2025

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

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

Back to the top