velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "phillip rhodes" <rhode...@telerama.com>
Subject escaping problem help sought.
Date Wed, 09 Oct 2002 02:05:56 GMT
I am trying to output some valid velocity code that a user can cut and paste into a velocity
template.  However, there is a mixture of both vtl and variables, some of which I want to
be interpolated, and some not.  I got things to work by splitting the line I want to output
into 2 lines.  But if I try everything on the same line, my variable interpolations do not
happen.

While I can hobble along, I feel bothered by not understanding what I am doing wrong.  According
to the docs on escaping, what I am doing on one line should work.  Can anything point out
a limitation of velocity or how I can achieve this in velocity?


This is what I want to output...  (I do have this output if I break it up using two lines.
#jcontrol($jpage.getQuestionByName( "Which colorectal test used").getQuestionItemByName("Colonoscopy")


$questionname and $questionItem are two in scope variables that I want interpolated.
#jcontrol is a macro that I do not want to invoke, but needs to be output.
This is working:  (it's on two lines)

\#jcontrol($jpage.getQuestionByName(
"${questionname}").getQuestionItemByName("${questionItem.getName()}")

This is not working:
\#jcontrol($jpage.getQuestionByName("${questionname}").getQuestionItemByName("${questionItem.getName()}")


Thanks!!  



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message