[EMFForms] Additional model-specific services [message #1547206] |
Mon, 05 January 2015 09:41 |
Eclipse User |
|
|
|
Hi folks, I would like to provide additional functionality on top of base EMFForms renderers, like (but not limited to) auto complete, and I'm wondering if there's a way to do this in a generic way.
So, rather than implementing custom renderers which are aware of specific model element (which is the only way I know about right now), I would like to implement a generic renderer with autocomplete feature and then somehow bind to a model-specific "service" providing required info. I don't mind if this binding is done in a declarative way or programatically in code.
Thanks in advance for any ideas.
|
|
|
Re: [EMFForms] Additional model-specific services [message #1550814 is a reply to message #1547206] |
Wed, 07 January 2015 08:31 |
Jonas Helming Messages: 699 Registered: July 2009 |
Senior Member |
|
|
Hi,
in any case you need a custom renderer, which adds the desired behavior
to the UI. However, this custom renderer can in most cases be "generic"
meaning, it will work for all domain model elements. The custom renderer
could access a generic interface abstracting the service you want to
provide or a registry, where you can retreieve a service which is
specific for the model instance.
Maybe you can describe your use case more in detail, it is a little bit
difficult to answer this in an fully generic way.
Best regards
Jonas
Am 05.01.2015 um 10:41 schrieb Ondrej Ilcik:
> Hi folks, I would like to provide additional functionality on top of
> base EMFForms renderers, like (but not limited to) auto complete, and
> I'm wondering if there's a way to do this in a generic way.
>
> So, rather than implementing custom renderers which are aware of
> specific model element (which is the only way I know about right now), I
> would like to implement a generic renderer with autocomplete feature and
> then somehow bind to a model-specific "service" providing required info.
> I don't mind if this binding is done in a declarative way or
> programatically in code.
> Thanks in advance for any ideas.
--
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
|
|
|
Re: [EMFForms] Additional model-specific services [message #1561978 is a reply to message #1550814] |
Tue, 13 January 2015 12:17 |
Eclipse User |
|
|
|
Hi Jonas, thanks for your explanation and sorry for a bit late response.
Could you please elaborate a bit more on the following?
Quote:Custom renderer
could access a generic interface abstracting the service you want to
provide or a registry, where you can retreieve a service which is
specific for the model instance
How to access that service from my renderer? You mean registry as a general concept or is there a specific registry in EMF Forms I can use for services which are aware of a model and provide additional information to renderers?
To be more specific, let's say I'm implementing my own textbox renderer, which should provide the aforementioned autocomplete feature. Values provided by the autocomplete service might depend not only on a model, but also on some external conditions. This is the reason I would like have this in a separate service instead of being in a model directly.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02920 seconds