Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Dynamically hide/show property
Dynamically hide/show property [message #1775911] Wed, 08 November 2017 08:25 Go to next message
Axel Guckelsberger is currently offline Axel GuckelsbergerFriend
Messages: 344
Registered: July 2009
Senior Member
Hi,

is it possible to specify that a property A should only be visible depending on the content of another property B (or other conditions)?
Re: Dynamically hide/show property [message #1775918 is a reply to message #1775911] Wed, 08 November 2017 09:12 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 522
Registered: July 2009
Senior Member
Hi,
you can use the precondition expression of a property A's widget to check property B's value (or any other condition on the model) and return false if A should not be visible if some criteria is met.
Regards,


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Dynamically hide/show property [message #1775939 is a reply to message #1775918] Wed, 08 November 2017 13:26 Go to previous messageGo to next message
Axel Guckelsberger is currently offline Axel GuckelsbergerFriend
Messages: 344
Registered: July 2009
Senior Member
Hi Pierre,

I did not get it to work yet unfortunately.

Can you tell whether the following syntax is correct?

aql:if self.myEnumFeature <> myMetamodel::MyEnum::OPTION true else false endif


Thanks!
Re: Dynamically hide/show property [message #1775946 is a reply to message #1775939] Wed, 08 November 2017 13:57 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 522
Registered: July 2009
Senior Member
Hi. It seems you're missing the "then" keyword. This can probably be simplified as aql:self.myEnumFeature <> myMetamodel::MyEnum::OPTION.


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Dynamically hide/show property [message #1775949 is a reply to message #1775946] Wed, 08 November 2017 14:04 Go to previous messageGo to next message
Axel Guckelsberger is currently offline Axel GuckelsbergerFriend
Messages: 344
Registered: July 2009
Senior Member
Thank you.
Re: Dynamically hide/show property [message #1776011 is a reply to message #1775946] Thu, 09 November 2017 10:02 Go to previous messageGo to next message
Francesco Gallo is currently offline Francesco GalloFriend
Messages: 9
Registered: December 2015
Junior Member
Dear All,
I Have the same problem, but I don't understand the solution.

I have the meta class defined in Figure1 attached.

I would like that when AuthNTypeForwarded item is equal 'CustomAccount', than the genericAccount and genericCredential items will disabled on properties editor...

Can you help me? Please...

Thanks in advance
  • Attachment: Figure1.png
    (Size: 100.39KB, Downloaded 75 times)

[Updated on: Thu, 09 November 2017 11:05]

Report message to a moderator

Re: Dynamically hide/show property [message #1776158 is a reply to message #1776011] Mon, 13 November 2017 10:10 Go to previous messageGo to next message
Francesco Gallo is currently offline Francesco GalloFriend
Messages: 9
Registered: December 2015
Junior Member
No suggestions?
Re: Dynamically hide/show property [message #1776188 is a reply to message #1776158] Mon, 13 November 2017 15:03 Go to previous message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 470
Registered: May 2011
Senior Member
Hello,

In your case you should have the expression "aql: self.AuthNTypeForwarded = AuthenticationTypeForwaded::CustomAccount" in the "Precondition Expression" field or the "Is Enabled Expression" field depending on if you want to disable respectively a Group or a Widget.

Regards,
Steve


Steve Monnier - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Sirius Tutorials
Next Topic:[ANN] Sirius 4.1.7
Goto Forum:
  


Current Time: Tue Apr 07 11:34:48 GMT 2020

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

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

Back to the top