Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Sapphire » If-Then Condition
If-Then Condition [message #750134] Tue, 25 October 2011 16:47 Go to next message
Kamesh Sampath is currently offline Kamesh SampathFriend
Messages: 213
Registered: July 2009
Senior Member
I am in situation where I am loading two models with separate DTD's. There are few properties in the model that is available for one version and not available for other. So when defining the SDEF i decided to go with the If..then construct by evaluating a certain Transient property.
<if>
<condition>
	<class>HookVersionEvaluator</class>
	<parameter>v5_2_0</parameter>
</condition>
<then>
     <property-editor>CustomJspGlobal</property-editor>
</then>
</if>


My condition is getting evaluated correctly and am getting the expected boolean value.
On true am seeing the property editor on the page, but I am facing issue when its "false", my perception and understanding is that the Property "CustomJspGlobal" will not be shown when the HookVersionEvaluator#evaluate returns "false", but am getting an Quote:
java.lang.RuntimeException: Could not find property CustomJspGlobal in ....
, so when "false" the model is different and it cant find CustomJspGlobal so i was thinking that framework will skip this property rendering.

Any idea whats wrong here ?, and not sure why on false the property rendering or evaluation is happening ?
Re: If-Then Condition [message #750769 is a reply to message #750134] Tue, 25 October 2011 22:37 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
The if-then construct is currently implemented by initializing parts for both branches, but only rendering the appropriate branch. This isn't usually a problem, except in cases like yours. To make it work in your case and also for better performance, we should probably doing branch init/dispose on condition change. Please open a bug.

- Konstantin
Re: If-Then Condition [message #751656 is a reply to message #750769] Wed, 26 October 2011 05:50 Go to previous message
Kamesh Sampath is currently offline Kamesh SampathFriend
Messages: 213
Registered: July 2009
Senior Member
logged an enhancement https://bugs.eclipse.org/bugs/show_bug.cgi?id=362028
Previous Topic:Pseudo-uri
Next Topic:column header re-name
Goto Forum:
  


Current Time: Tue Apr 23 11:39:39 GMT 2024

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

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

Back to the top