Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF FORMS] View no content update(No update of data content in view when generating form with no data initially)
[EMF FORMS] View no content update [message #1857850] Wed, 01 March 2023 15:57 Go to next message
Alex Wesp is currently offline Alex WespFriend
Messages: 6
Registered: November 2015
Junior Member
I got a problem but maybe I missed something important:

I wrote an e4+EMFForms application which gets it data from a ecore file model. Therefor I create a service which handle the loading of the resources and registering the model. Every part get the service injected and create the root element from the model data, presented by the file service.

The challenge is now that for the time of part creation the user not chosen the model file where all the data are stored. Therefor a empty dummy resource with same structure is presented by the file service to the parts that the views can be generated. Later the user choose the model data file (via handler) and the correct model file will be loaded by the service. The dummy resource object in the service will be unload, and the final resource will be load - but the parts do not recognize the changed resource.

I have no idea how to solve this: I only have a "central" file but multiple parts to present the data, which could be change while runtime (dummy to real data file or other data file leads to the same problem). Any hints highly welcomed. Thanks.
Re: [EMF FORMS] View no content update [message #1857961 is a reply to message #1857850] Wed, 08 March 2023 11:57 Go to previous message
Eugen Neufeld is currently offline Eugen NeufeldFriend
Messages: 174
Registered: May 2015
Senior Member
Hi Alex,

For the initial case you describe I would rather not show an empty form but another UI to indicate to the user what to do.
If you really want to show your empty dummy file, EMFForms offers a method to exchange the data:
The EMFFormsViewContext which is a ViewModelContext offers this method:
void changeDomainModel(EObject newDomainModel);
This should lead to a refresh of your ui as the internal binding is retriggered.

If this is not what you were looking for, please share a bit of code to better undestand what you are trying to achieve.

Best,
Eugen


--
Eugen Neufeld

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Previous Topic:Design information on Ecore2Ecore, Ecore2XML
Next Topic:[Edapt] No metamodel found error, need additional information besides tutorial
Goto Forum:
  


Current Time: Fri May 03 01:27:01 GMT 2024

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

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

Back to the top