velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juan Dellarroquelle" <rayu...@usa.net>
Subject Re: Parsing behavior question
Date Mon, 15 Jul 2002 14:26:25 GMT
Hey! Two in one!
Thanks for the quick answer.

Juan.

----- Original Message -----
From: "Geir Magnusson Jr." <geirm@adeptra.com>
To: <velocity-user@jakarta.apache.org>
Sent: Monday, July 15, 2002 11:23 AM
Subject: Re: Parsing behavior question


> On 7/15/02 10:17 AM, "Juan Dellarroquelle" <rayuela@usa.net> wrote:
>
> > Hello,
> >
> > Let's say that I have an object in the context "foo" that exposes a
method
> > "getText()"
> > and I'm using it inside a Velocity template like this:
> >
> > $foo.getText()
> >
> > If I had another String object in the Velocity context called "fooStr"
and
> > the
> > getText() method would return a string like: "This is just a ${fooStr}
> > sample text",
> > Would velocity parse the ${fooStr} inside the returned string by
> > $foo.getText() ?
>
> No.  velocity doesn't do anything to returned values.  I think that except
> for this case, you would never want that.
>
> Now, your next question will be "how do I do this then?" and the answer is
a
> tool that takes the string and renders it against the context.  You can do
> this using the Velocity.evaluate() methods.
>
> I owe a contribution of a tool (promised someone else), so I'll get off my
> kiester and do this.
>
>
> --
> Geir Magnusson Jr.
> Research & Development, Adeptra Inc.
> geirm@adeptra.com
> +1-203-247-1713
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:velocity-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:velocity-user-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message