Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Sapphire » Include Params behavior/useage
Include Params behavior/useage [message #1181479] Mon, 11 November 2013 16:29 Go to next message
Paul Kolonay is currently offline Paul KolonayFriend
Messages: 16
Registered: September 2013
Junior Member
Can a param Value that is passed to an include be used as a reference?

For instance, with the sdef below can the value in the File property be seen by the included composite? The visible-when below will of course always produce the same result... is there some way, using the param value, to reference to the File property?

The motivation for this is that depending on where the composite is included, the path to the property can change. I would like to pass the property path to the include.

I have seen a couple of places where the Params field of the Include part is used but my use case does not seem to be captured by any of them.


<include>
	<param>
		<name>FilePath</name>
		<value>File</value>
	</param>
	<part>a.composite</part>
</include>
<composite>
	<id>a.composite</id>
	<content>
		<property-editor>
			<property>SomeProperty</property>
			<child-property>
				<property>ChildProperty</property>
			</child-property>
		</property-editor>
	</content>
	<visible-when>${Params.FilePath != null}</visible-when>
</composite>


[Updated on: Mon, 11 November 2013 16:30]

Report message to a moderator

Re: Include Params behavior/useage [message #1181504 is a reply to message #1181479] Mon, 11 November 2013 16:46 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
Try this expression...

${ This[ Params.FilePath ] != null }


"This" property does what you think it does, simply referencing the context element. The bracket notation is an alternative to the dot notation for cases where property name is itself an expression.

These two expressions are equivalent.

${ Something.Name }
${ Something[ "Name" ] }

[Updated on: Mon, 11 November 2013 16:49]

Report message to a moderator

Re: Include Params behavior/useage [message #1182762 is a reply to message #1181504] Tue, 12 November 2013 11:52 Go to previous message
Paul Kolonay is currently offline Paul KolonayFriend
Messages: 16
Registered: September 2013
Junior Member
Worked as advertised. Thanks much for the quick response.
Previous Topic:Label on 'With'
Next Topic:What is the difference between "@DependsOn" and "FilteredListener<PropertyContentE
Goto Forum:
  


Current Time: Thu Dec 26 11:38:54 GMT 2024

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

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

Back to the top