Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Forms] Show Rule not working if condition is an Enum Feature
[EMF Forms] Show Rule not working if condition is an Enum Feature [message #1440255] Wed, 08 October 2014 06:00 Go to next message
Annamalai Mising name is currently offline Annamalai Mising nameFriend
Messages: 126
Registered: July 2009
Senior Member
Hi

I have 2 Groups in a form. 1st group has a Enum Combo.
Based on the value in the Combo, i need to decide to show or not show the 2nd Group.

So on the 2nd Group, i created a Show Rule, Enabled the Rule and in the Leaf Condition i added the Feature Reference to the Enum Variable in my Model. then on the leaf condition if i click on select object to get the popup to mention the Enum Value, i see nothing really happening.

therefore doubt if enum is supported in the Leaf Condition of Show Rule or Enable Rule. not sure if i am making a mistake. But if i put an integer or boolean as Feature Reference then Select Object is opening up the dialog.

Regards
Malai
Re: [EMF Forms] Show Rule not working if condition is an Enum Feature [message #1440319 is a reply to message #1440255] Wed, 08 October 2014 08:00 Go to previous messageGo to next message
Annamalai Mising name is currently offline Annamalai Mising nameFriend
Messages: 126
Registered: July 2009
Senior Member
As a follow up, if i try to use a EDate, i get a clear error message stating datatype selected is not a primitive data type. I dnt get anything of that sort when its an enum.
Support of ENUM would be really useful, i am sure its similar to String datatype. Looking forward to your response on how to handle Enum if there is a workaround available.
Re: [EMF Forms] Show Rule not working if condition is an Enum Feature [message #1440338 is a reply to message #1440255] Wed, 08 October 2014 08:26 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,

Enum is definitly supported, I would say 90% of the use cases are Enums.
I am not sure, what is wrong here, which version do you use?
Can you reproduce this with an example model?

Best regards

Jonas

Am 08.10.2014 08:00, schrieb Annamalai Chockalingam:
> Hi
>
> I have 2 Groups in a form. 1st group has a Enum Combo.
> Based on the value in the Combo, i need to decide to show or not show
> the 2nd Group.
> So on the 2nd Group, i created a Show Rule, Enabled the Rule and in the
> Leaf Condition i added the Feature Reference to the Enum Variable in my
> Model. then on the leaf condition if i click on select object to get the
> popup to mention the Enum Value, i see nothing really happening.
>
> therefore doubt if enum is supported in the Leaf Condition of Show Rule
> or Enable Rule. not sure if i am making a mistake. But if i put an
> integer or boolean as Feature Reference then Select Object is opening up
> the dialog.
>
> Regards
> Malai
Re: [EMF Forms] Show Rule not working if condition is an Enum Feature [message #1440355 is a reply to message #1440338] Wed, 08 October 2014 09:03 Go to previous messageGo to next message
Annamalai Mising name is currently offline Annamalai Mising nameFriend
Messages: 126
Registered: July 2009
Senior Member
Thanks Jonas for your prompt reply.

Attached is the User.view from the makeithappen example.
I am on 1.3 version of ECP and EMF Forms SDK

In the Weight control. I have added Show Rule with a Leaf Condition with reference to Feature Gender. I want to show this filled if the Gender is Male and hide it if the Gender is Female.

just to show you the other case is working. I have put a show rule inside email that it should be shown only with the active control is checked. And that works.
  • Attachment: User.view
    (Size: 6.31KB, Downloaded 230 times)
Re: [EMF Forms] Show Rule not working if condition is an Enum Feature [message #1440955 is a reply to message #1440355] Thu, 09 October 2014 04:14 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Could you kindly retest that with the latest version (1.4.1)

Am 08.10.2014 11:03, schrieb Annamalai Chockalingam:
> Thanks Jonas for your prompt reply.
>
> Attached is the User.view from the makeithappen example.
> I am on 1.3 version of ECP and EMF Forms SDK
>
> In the Weight control. I have added Show Rule with a Leaf Condition with reference to Feature Gender. I want to show this filled if the Gender is Male and hide it if the Gender is Female.
>
> just to show you the other case is working. I have put a show rule inside email that it should be shown only with the active control is checked. And that works.
>
Re: [EMF Forms] Show Rule not working if condition is an Enum Feature [message #1441787 is a reply to message #1440955] Fri, 10 October 2014 07:19 Go to previous message
Annamalai Mising name is currently offline Annamalai Mising nameFriend
Messages: 126
Registered: July 2009
Senior Member
Did test it on 1.4.1 and it is working. On clicking on the Select Object button, i get a dialog with Enum List.
But now when i work with Direct Controls, refresh is awesome. But if i apply visibility to Group, then the refresh is bad. It doesnt expand the group. I need to maximise the editor and then the group appears.
This looks like a SWT Pack issue that we generally face during inserting new widgets or making their visibility true. Will try to attach a screenshot soon for better understanding.
Previous Topic:[TEXO] autogenerate toString() should include super class
Next Topic:EMFstore: encrypted model persistence?
Goto Forum:
  


Current Time: Tue Mar 19 06:28:44 GMT 2024

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

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

Back to the top