Skip to main content



      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 12:06 Go to next message
Eclipse UserFriend
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 13:42] by Moderator

Re: [EMF Forms] Implement check on data input [message #1743861 is a reply to message #1743792] Tue, 20 September 2016 05:43 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: [EMF Forms] Implement check on data input [message #1743912 is a reply to message #1743792] Tue, 20 September 2016 10:55 Go to previous message
Eclipse UserFriend
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: Wed Jul 23 13:48:30 EDT 2025

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

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

Back to the top