Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Forms] Implement check on data input
[EMF Forms] Implement check on data input [message #1743792] Mon, 19 September 2016 16:06 Go to next message
Andrea Genovese is currently offline Andrea GenoveseFriend
Messages: 6
Registered: August 2016
Junior Member
Hello everyone,

I'm learning to use EMF and EMF Forms, I've created my model and generated all the views.
What I want to do now is implement some checks on certain forms, for example: if the telephone number is higher than X characters, deny the input and show an error message, or, considering a class that has two references towards a certain other class, if those two references are the same, deny the input and show an error message.
Were should I start/look in order to achieve this?

Best regards.

Edit: I forgot to mention that I already tried to do this by inserting an if statement in the ClassImpl of the model plugin, but this way, it won't allow me to create an instance.

[Updated on: Mon, 19 September 2016 17:42]

Report message to a moderator

Re: [EMF Forms] Implement check on data input [message #1743861 is a reply to message #1743792] Tue, 20 September 2016 09:43 Go to previous messageGo to next message
Eugen Neufeld is currently offline Eugen NeufeldFriend
Messages: 174
Registered: May 2015
Senior Member
Hi Andrea,
you can look at this blog: http://eclipsesource.com/blogs/2014/08/26/emf-validation-for-datatype-constraints/
Also check out this resources about emf constraints:
http://eclipsesource.com/blogs/tutorials/tutorialshow-to-customize-the-emf-client-platform/
http://acapio.de/Programmierung/Eclipse/Add_a_constraint_to_an_Ecore_model/index.html

Cheers,
Eugen


--
Eugen Neufeld

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [EMF Forms] Implement check on data input [message #1743912 is a reply to message #1743792] Tue, 20 September 2016 14:55 Go to previous message
Andrea Genovese is currently offline Andrea GenoveseFriend
Messages: 6
Registered: August 2016
Junior Member
Thank you so much, that's exactly what I was looking for!

Best regards.
Previous Topic:[EMFForms] Improvements on the Layout of the generated Form
Next Topic:[Edapt] Edapt validation for earlier releases
Goto Forum:
  


Current Time: Thu Apr 18 03:19:19 GMT 2024

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

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

Back to the top