You have to place the object of class mail you want to call methods on in
the context. You can do this in buildNormalContext(), by using code like
this:

context.put("myObject", myObject);

Then, in the .vm file, the object is available as the name you gave as key,
plus the dollar sign, and you can then call methods on it:

$myObject.callMethod();

Check out chapter 7 of the tutorial.

-Stijn


----- Original Message -----
From: "Naveen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, February 07, 2004 11:35 AM
Subject: How to invoke a user defined method from a class in a vm file.


> Hi
>   can anyone clear my doubt.
>    I have created a class called mail.i have 4 methods in it.From a .vm
> file I need to call these methods and pass parameters through  these
> methods how will I do it.
>
> Please Help me.
>
> With regards
> Naveen
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to