|Re: [EMF Forms] Multiple views of a model class with e4 [message #1758575 is a reply to message #1758540]
||Thu, 30 March 2017 09:12
| Eugen Neufeld
Registered: May 2015
Hi Alexander, |
the Problem is, that you now have simply registered two view model.
EMFForms cannot distinguish between the two.
You need to change your registration to:
<filter key="detail" value="true"></filter>
You can check this Tutorial: http://eclipsesource.com/blogs/tutorials/emf-forms-view-model-elements/#treemasterdetail
The CodeBlock is broken, should be fixed soon.
I think that in your case it would be better to provide the view model directly when rendering using this call:
org.eclipse.emf.ecp.view.internal.swt.ECPSWTViewRendererImpl.render(Composite, EObject, VView)
In order to retrieve the correct view from the registry you can use this:
VViewModelLoadingProperties properties = VViewFactory.eINSTANCE.createViewModelLoadingProperties();
final VView view = ViewProviderHelper.getView(dmr, properties);
The example above will retrieve the Task.view. For the TaskTree.view just provide null instead of the properties .
Get professional Eclipse developer support:
Powered by FUDForum
. Page generated in 0.02468 seconds