« Return to Thread: #set to the result of a #parse?

RE: #set to the result of a #parse?

by scott.grunewald :: Rate this Message:

Reply to Author | View in Thread

Is there any way to #parse a string variable rather than a file?
 
I have a java class that passes a string with in-line references, like so:
 
$refstring = "The beverage I like is ${beverage}."
 
The $beverage variable is populated before this point in the script, but when I return the $refstring variable it is displayed unparsed. How is #parse used to make Velocity re#parse a string variable?
 
Thank you,
 
Scott Grunewald
scott.grunewald@...
AIM: ScottGrunewald
Office #: 905-804-6942

________________________________

From: White, Tim [mailto:Tim.White@...]
Sent: Fri 5/2/2008 5:08 PM
To: Velocity Users List
Subject: RE: #set to the result of a #parse?



D'oh!

-----Original Message-----
From: Nathan Bubna [mailto:nbubna@...]
Sent: Friday, May 02, 2008 2:52 PM
To: Velocity Users List
Subject: Re: #set to the result of a #parse?

#set( $processFullInfo = "#parse( 'fullInfoYesNo.vm' )" )

:)

On Fri, May 2, 2008 at 1:42 PM, White, Tim <Tim.White@...> wrote:

> Hi there -
>
>   Just curious if there is a way to do somthing like this:
>
>   #set ($processFullInfo = #parse("fullInfoYesNo.vm"))
>
>  The idea being that fullInfoYesNo.vm contains YES or NO.
>
>  I know I can put the whole #set into the #parsed file, but other
> processes are using that same file, and need it to be just YES or NO.
>
>  Thanks,
>
>  Tim
>
>
>  This communication is the property of Qwest and may contain
> confidential or  privileged information. Unauthorized use of this
> communication is strictly  prohibited and may be unlawful.  If you
> have received this communication  in error, please immediately notify
> the sender by reply e-mail and destroy  all copies of the
communication and any attachments.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...






This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...

 « Return to Thread: #set to the result of a #parse?

LightInTheBox - Buy quality products at wholesale price