Menu

Formal Reference Issue

Help
Andrew
2007-08-28
2013-04-17
  • Andrew

    Andrew - 2007-08-28

    I'm having trouble using formal references in my current C# app.

    Template.vm file (partial):
    I just sponsored a child named ${FirstChild.FirstName} from...

    C# code (partial):
    templateValues.Add(new KeyValueItem("FirstChild", firstChild));

    The code goes through web services and class libraries and all sorts of leaping around, but the Child object definitely contains the required detail.

    As soon as I add any formal reference (ie: ${Blah.Blah}) it breaks the template and sends a blank email.

    Is this a symptom of a bad template file, or am I dropping the values somehow? If I drop formal references and make them literal string values (instead of passing an object to the template) it works fine.

     
    • Mike Bridge

      Mike Bridge - 2007-08-28

      Hi-

      I believe this is the same issue as with with the directives:

        https://sourceforge.net/forum/message.php?msg_id=4293443

      Whether it's a bug or whether NVelocity was ported before this was implemented in Velocity, I'm not sure, but you should be able to use the workaround in that thread.

      Cheers!

      -Mike

       

Log in to post a comment.