Skip to main content



      Home
Home » Archived » Sapphire » Include Params behavior/useage
Include Params behavior/useage [message #1181479] Mon, 11 November 2013 11:29 Go to next message
Eclipse UserFriend
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 11:30] by Moderator

Re: Include Params behavior/useage [message #1181504 is a reply to message #1181479] Mon, 11 November 2013 11:46 Go to previous messageGo to next message
Eclipse UserFriend
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 11:49] by Moderator

Re: Include Params behavior/useage [message #1182762 is a reply to message #1181504] Tue, 12 November 2013 06:52 Go to previous message
Eclipse UserFriend
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: Sat Apr 26 23:51:46 EDT 2025

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

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

Back to the top