On Fri, May 2, 2008 at 3:30 PM, <[EMAIL PROTECTED]> wrote:
> 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?
#parse doesn't do this. in all currently released versions of
Velocity, you have to use something like the RenderTool
(http://velocity.apache.org/tools/releases/1.4/generic/RenderTool.html).
In Velocity 1.6, there will be a new directive that you will be able
to use like this: #evaluate( $refstring )
> Thank you,
>
> Scott Grunewald
> [EMAIL PROTECTED]
> AIM: ScottGrunewald
> Office #: 905-804-6942
>
> ________________________________
>
> From: White, Tim [mailto:[EMAIL PROTECTED]
> 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:[EMAIL PROTECTED]
> 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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
>
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]