Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Forms] validation processing
[EMF Forms] validation processing [message #1711572] Sat, 17 October 2015 11:03 Go to next message
Eclipse UserFriend
Hi

I wonder how it is intended to process invalid forms, i.e. those with failed validation.

As far I can see, EMF Forms only adds highlighting if there are constraint violations (also maybe some other things I am not aware of). But it does not disable any buttons, so it is always possible to create model objects, no matter if they are invalid.

Actually the primary goal of validation is to prevent creating invalid state, so I am sure that I am missing something, but I can't find appropriate documentation relating to this issue.
Re: [EMF Forms] validation processing [message #1711728 is a reply to message #1711572] Mon, 19 October 2015 09:00 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

EMF itself does not prevent creating invalid states and so doesn't EMF
Forms, which does not add any additional logic here. Validation is
checking a current model instance against those rules. However, for some
model constraints it would be possible to enforce them beforehand.
I assume you talking about multiplicities? They could actually be
enforced by multi-attribute and multi-references controls, but that
would require some customization.

Best regards

Jonas

Am 17.10.2015 um 17:03 schrieb Klim Tow:
> Hi
>
> I wonder how it is intended to process invalid forms, i.e. those with
> failed validation.
>
> As far I can see, EMF Forms only adds highlighting if there are
> constraint violations (also maybe some other things I am not aware of).
> But it does not disable any buttons, so it is always possible to create
> model objects, no matter if they are invalid.
>
> Actually the primary goal of validation is to prevent creating invalid
> state, so I am sure that I am missing something, but I can't find
> appropriate documentation relating to this issue.


--
--

Jonas Helming

Get professional Eclipse developer support:

http://eclipsesource.com/en/services/developer-support/
Re: [EMF Forms] validation processing [message #1711744 is a reply to message #1711728] Mon, 19 October 2015 09:40 Go to previous messageGo to next message
Eclipse UserFriend
Hi Jonas

normally if the mandatory fields are not set, the OK-Button should be disabled.
Those fields can be of primitive types or references (multi or single, that's insignificant)

Klim
Re: [EMF Forms] validation processing [message #1711826 is a reply to message #1711744] Tue, 20 October 2015 01:17 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

yes, but there is no OK button in EMF Forms. If you embed it into a
dialog, you can program the OK button to behave exactly in the way you
described.

Best regards

Jonas

Am 19.10.2015 um 15:40 schrieb Klim Tow:
> Hi Jonas
>
> normally if the mandatory fields are not set, the OK-Button should be
> disabled.
> Those fields can be of primitive types or references (multi or single,
> that's insignificant)
>
> Klim


--
--

Jonas Helming

Get professional Eclipse developer support:

http://eclipsesource.com/en/services/developer-support/
Re: [EMF Forms] validation processing [message #1711897 is a reply to message #1711826] Tue, 20 October 2015 05:26 Go to previous messageGo to next message
Eclipse UserFriend
yes, you are right - there are only OK buttons in multi-attribute and multi-references controls

what would be the best way to customize them - custom renderers which extend the controls?
Re: [EMF Forms] validation processing [message #1711911 is a reply to message #1711897] Tue, 20 October 2015 05:44 Go to previous messageGo to next message
Eclipse UserFriend
Exactly...

Am 20.10.2015 um 11:26 schrieb Klim Tow:
> yes, you are right - there are only OK buttons in multi-attribute and
> multi-references controls
>
> what would be the best way to customize them - custom renderers which
> extend the controls?


--
--

Jonas Helming

Get professional Eclipse developer support:

http://eclipsesource.com/en/services/developer-support/
Re: [EMF Forms] validation processing [message #1712023 is a reply to message #1711911] Tue, 20 October 2015 15:01 Go to previous message
Eclipse UserFriend
alrighty then
Previous Topic:[EMF Forms] constraints for unsettable=true and lowerBound=1
Next Topic:[EMF Forms] 1.7.1: target definition broken?
Goto Forum:
  


Current Time: Thu Jul 24 19:46:07 EDT 2025

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

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

Back to the top