Let's say I have a macro like this (from GlobalMacros.vm in newapp
that comes with the TDK):

#macro (entryCell $body)
  <td bgcolor="$ui.formFieldColor">
    <font face="$ui.sansSerifFonts">
      $body &nbsp;
    </font>
  </td>
#end


Now, I want to do something like this:

#entryCell ("<a href=\"$link.setPage(\"EventDetail.vm\").addPathInfo(\"eventId\", 
$entry.getId())\">$entry.Title</a>")


With the backslash before the double quotes inside the "string
literal", I get a result of this:

  <td bgcolor="#ffffff">
    <font face="lucida sans">
      <a href=\"$link.setPage(\"EventDetail.vm\").addPathInfo(\"eventId\", 
$entry.getId())\">$entry.Title</a> &nbsp;
    </font>
  </td>


This obviously isn't what I wanted.  But, if I take even just one
backslash out, then I get things like this in my log:

Tue Jul 10 03:41:36 GMT-06:00 2001   [warn] 
org.apache.velocity.runtime.exception.ReferenceException: reference : template = 
screens/EventList.vm [line 1,column 11] : $link.setPage is not a valid reference.


And, to make thigs worse, the line number and column number of
the warning isn't even correct.

Any ideas on a work around (I already tried creating a variable with
#set but had little success).

Thanks,
Jason

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to