Thank you Will. The workaround you have suggested worked for me. I don't remember reading about this in the release notes, unless I missed it. I have a feeling that this may not be that obscure a scenario and it should be documented in the release notes if it is not already.
Thanks. Will Glass-Husain-2 wrote: > > Ashish-- > > It sounds like you might have hit this issue? > > https://issues.apache.org/jira/browse/VELOCITY-504 > > There's a workaround described in the comments. > > Unfortunately, by fixing bug VELOCITY-285 we made calls to > Velocity.evaluate() have different behavior in Velocity 1.5. > > Let us know if this helps or if you need more guidance. > > Best, WILL > > > On 3/29/07, anarvekar <[EMAIL PROTECTED]> wrote: >> >> I have the following macro defined in VM_global_library.vm >> >> ## Select control using LabelValue objects (label property, value >> property) >> ## $name The control name >> ## $selected The selected value >> ## $list The collection of LabelValue beans >> #macro (selectcontrol $name $selected $list $id $text $maxlen >> $funcassociated) >> #set($s="NULL" ) >> #set($s=$selected ) >> <select name="$name" style="width: $maxlen;" $funcassociated> >> #foreach ($e in $list ) >> #set($D = "$") >> #set($getId = "${D}e.$id") >> #set($getText = "${D}e.$text") >> #set($v = $render.eval("$getId")) >> <option value="$v"#if("$v"=="$s") >> selected="true"#end>$render.eval("$getText")</option> >> #end >> </select> >> #end >> >> This used to get evaluated fine in Velocity1.4. I migrated to Velocity1.5 >> and now, I get the following message from Velocity >> >> 09:47:02,466 INFO [[/]] Velocity [info] Null reference [template >> 'RenderTool.eval()', line 1, column 1] : $e.Severit >> yName cannot be resolved. >> 09:47:02,466 INFO [[/]] Velocity [info] Null reference [template >> 'RenderTool.eval()', line 1, column 1] : $e.Severit >> yName cannot be resolved. >> >> As a result, what is output is $e.SeverityName instead of the actual >> values >> (like High, Medium, Low, etc.). I have confirmed that if I just replace >> the >> Velocity1.5 jar file with the Velocity1.4 jar file, things start working >> again. I have tried to find something in the release notes/change logs >> that >> I might have missed but I can't seem to find anything. What am I missing >> here? BTW, both versions are even using the same velocity.properties file >> and toolbox.xml >> >> Thanks. >> >> -- >> View this message in context: >> http://www.nabble.com/Null-reference-after-migrating-to-Velocity1.5-tf3486570.html#a9734059 >> Sent from the Velocity - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > -- > Forio Business Simulations > > Will Glass-Husain > [EMAIL PROTECTED] > www.forio.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Null-reference-after-migrating-to-Velocity1.5-tf3486570.html#a9754823 Sent from the Velocity - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
