Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Forms] Receive notifications of rendered form
[EMF Forms] Receive notifications of rendered form [message #1294786] Sun, 13 April 2014 20:12 Go to next message
M. Herrmann is currently offline M. HerrmannFriend
Messages: 25
Registered: March 2010
Junior Member
Hi,

I am testing EMF Forms for my application and have a question.
I successfully rendered a form in my editor part using

ECPSWTView ecpView = ECPSWTViewRenderer.INSTANCE.render(content, myDomainObject);

The form is displayed correctly.

On Thing that is not obvious to me is how I get notified about changes in the view (for example if the user enters text for a EString Attribute in the text field).

Can someone explain to me how this works?
How and when is the model object updated?



Thanks











Re: [EMF Forms] Receive notifications of rendered form [message #1295342 is a reply to message #1294786] Mon, 14 April 2014 07:28 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,

by default and without any adaptation, the controls use bi-directional
data-binding and will update the model on "focus lost". Therefore the
easiest way to get notified about changes would be to register on the
model itself.

Best regards

Jonas


Am 13.04.2014 22:12, schrieb M. Herrmann:
> Hi,
>
> I am testing EMF Forms for my application and have a question.
> I successfully rendered a form in my editor part using
>
> ECPSWTView ecpView = ECPSWTViewRenderer.INSTANCE.render(content,
> myDomainObject);
>
> The form is displayed correctly.
>
> On Thing that is not obvious to me is how I get notified about changes
> in the view (for example if the user enters text for a EString Attribute
> in the text field).
>
> Can someone explain to me how this works?
> How and when is the model object updated?
>
>
>
> Thanks
>
>
>
>
>
>
>
>
>
>
>
>
Re: [EMF Forms] Receive notifications of rendered form [message #1295372 is a reply to message #1295342] Mon, 14 April 2014 07:57 Go to previous messageGo to next message
M. Herrmann is currently offline M. HerrmannFriend
Messages: 25
Registered: March 2010
Junior Member
Thanks for the reply.
I guessed that i have to listen to model changes so I added an adapter but I did not get any notifications. Thats's why I posted here.
I also set breakpoints to check whether my setters are called but they never get called.
Only the getters are called when rendering the form.






Re: [EMF Forms] Receive notifications of rendered form [message #1296800 is a reply to message #1295372] Tue, 15 April 2014 07:55 Go to previous message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,

that is definitely not the expected behavior. The data binding to the
model is kind of the core functionality of the framework, if this does
not work for you, there is something wrong. Unfortunately, I currently
have no idea, what the problem could be. Which attribute type are you
testing with? Did you make sure you lost the focus after changing an
attribute? Do the controls should the values of attributes, which are
already set in the model before opening the form? Do you have any
exceptions in the console? Can you create a test case reproducing this
error?

Best Regards

Jonas


Am 14.04.2014 09:57, schrieb M. Herrmann:
> Thanks for the reply.
> I guessed that i have to listen to model changes so I added an adapter
> but I did not get any notifications. Thats's why I posted here.
> I also set breakpoints to check whether my setters are called but they
> never get called.
> Only the getters are called when rendering the form.
>
>
>
>
>
>
Previous Topic:[EMFStore] Model updates on client and server side
Next Topic:[EMF Forms] Replacing renderers
Goto Forum:
  


Current Time: Sun Mar 07 14:12:27 GMT 2021

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

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

Back to the top