Include Params behavior/useage [message #1181479] |
Mon, 11 November 2013 16:29 |
Paul Kolonay 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 |
Konstantin Komissarchik 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
|
|
|
|
Powered by
FUDForum. Page generated in 0.03308 seconds