Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Forms] render views read-only dynamically
[EMF Forms] render views read-only dynamically [message #1710193] Mon, 05 October 2015 09:18 Go to next message
Klim Tow is currently offline Klim TowFriend
Messages: 49
Registered: September 2015
Member
Hi

is it possible to render the whole view read-only/not-read-only at run-time?
The model elements are not read-only but in some cases they should be rendered as read-only. For instance if the user does not have permissions to modify particular domain objects.
Re: [EMF Forms] render views read-only dynamically [message #1710324 is a reply to message #1710193] Tue, 06 October 2015 06:39 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,

sure, just iterate over the view model an set all view model elements to
read-only, which should be rendered as read-only.

Best regards

Jonas

Am 05.10.2015 um 11:18 schrieb Klim Tow:
> Hi
>
> is it possible to render the whole view read-only/not-read-only at
> run-time? The model elements are not read-only but in some cases they
> should be rendered as read-only. For instance if the user does not have
> permissions to modify particular domain objects.


--
--

Jonas Helming

Get professional Eclipse developer support:

http://eclipsesource.com/en/services/developer-support/
Re: [EMF Forms] render views read-only dynamically [message #1710334 is a reply to message #1710324] Tue, 06 October 2015 07:21 Go to previous messageGo to next message
Eugen Neufeld is currently offline Eugen NeufeldFriend
Messages: 152
Registered: May 2015
Senior Member
Hi,
you can also set the read-only flag on the view element (so the root) and the whole form should be rendered as read-only.
If you need to set specific elements to read-only use Jonas' suggestion.

Cheers


--
Eugen Neufeld

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [EMF Forms] render views read-only dynamically [message #1710358 is a reply to message #1710334] Tue, 06 October 2015 08:21 Go to previous message
Klim Tow is currently offline Klim TowFriend
Messages: 49
Registered: September 2015
Member
org.eclipse.emf.ecp.view.spi.model.VElement.setReadonly(boolean)

I should have figured that out myself

thank you guys
Previous Topic:[EMF Forms] Cannot edit models in Forms
Next Topic:[EMF Forms] render view inside a scrollable composite
Goto Forum:
  


Current Time: Wed Feb 26 08:25:19 GMT 2020

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

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

Back to the top