Hi,
I'm developer at CERN and I started to use velocity yesterday and I have
many questions but, I have this piece of code:
#macro( screenType2 $title $text $parameters $name)
<Screen title="Set $title" visible="true" name="screen$name">
<panel layout="GridBagLayout">
#header($text)
<panel layout="FlowLayout" >
<gridbagconstraints fill="GridBagConstraints.BOTH"
insets="2,2,2,2"
gridx="0" gridy="1" weightx="1.0" weighty="0.8"/>
#foreach( $parameter in $parameters)
##$attributeController.getDeviceAttributeValue("AAA", "BBB")
##$parameter
##$attributeController.getDeviceAttributeValue( "$parameter", "IMAX_EG"
)
#set( $imax =
$attributeController.getDeviceAttributeValue(
"$parameter", "IMAX_EG" ) )
#if( ! $imax )
#set( $imax="5" )
#end
##set( $imin =
$attributeController.getDeviceAttributeValue(
$parameter, "IMIN" ) )
#if( ! $imin )
#set( $imin="0" )
#end
#set( $inom =
$attributeController.getDeviceAttributeValue(
"$parameter", "INOM" ) )
#if( ! $inom )
#set( $inom="3" )
#end
#set( $parameter =
$converter.getDeviceNameSplited("$parameter"))
<ParameterInfoViewerValueInd fieldName="I_MEAS" abs="true"
maxValue="$imax" minValue="$imin" nomValue="$inom" textColorInversion="true"
errorColor="blue" Background="blue" onlyStatic="false"
PreferredSize="295,26" border="MatteBorder(1,1,1,1,black)"
Foreground="white" Font="-BOLD-18"
StringColorCondition="FLT_OFF,OFF,FLT_STOPPING,STOPPING,STARTING,SLOW_ABORT,TO_STANDBY,ON_STANDBY,IDLE,CHECKING,ARMED,RUNNING,ABORTING,DIRECT_RT;
red, white, orange, FFFF5A, FFFF5A, orange, FFFF5A, green, green, green,
8c06a0, FFFF5A, FFFF5A, FFFF5A" noValueText='$parameter'
ParameterNames="${parameter}#STATE_PC">
</ParameterInfoViewerValueInd>
Where the variable '$parameter' represents a name of a parameter spited with
set( $parameter = $converter.getDeviceNameSplited("$parameter"))......the
problem is that this application is dynamic....and when
ParameterNames="${parameter}#STATE_PC" is invoked the parameter value was
already splited and I can't get the initial parameter value defined in the
beginning of the macro....so...I get always the noValueText...
So, I would like to know how to solve this....
PS: I really don't know if I expressed myself well...
--
View this message in context:
http://www.nabble.com/Noob-guy-in-Velocity-terminology-tf3452940.html#a9632112
Sent from the Velocity - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]