Hi Steve,

Two changes to Velocity 1.5 that are relevant

With properties, you can configure the left hand side to be set to
null and the error message to be suppressed.

You can implement an InvalidReferenceEventHandler that will track all
invalid references, including method calls.

WILL


On 3/13/07, Loeppky, Steve <[EMAIL PROTECTED]> wrote:
Please disregard this email as I was calling my getURL method with the 
parameters in the wrong order.  When they're in the right order, everything 
works fine :)

As an aside, it would nice if velocity would log that the method couldn't be found as 
compared to saying that the "RHS of #set statement is null."  Maybe this have 
better described in 1.5?

Steve

> _____________________________________________
> From:         Loeppky, Steve
> Sent: Tuesday, March 13, 2007 12:26 PM
> To:   '[email protected]'
> Subject:      Can I call a method of an object that takes parameters in a .vm 
file?
>
> Hello,
>
> My example code is:
>
> #set($url = $view.getURL($experiment, $realm))
>
> In this case $view holds a reference to an object to a type View (this is a 
type that I have defined).  The View class has the public method:
>
> Public String getURL(WlaExperiment experiment, WlaRealm realm)
>
> These are all types used in our business logic.
>
> When I hook up a debugger, I find that the getURL method never gets called.  In the 
velocity log file I see "RHS of #set statement is null. Context will not be 
modified."
>
> Does Velocity support calling methods of objects that take parameters?  In the velocity-1.5 user guide, I saw the 
following: "$person.setAttributes( ["Strange", "Weird", "Excited"] )", which seems 
to suggest that it does.
>
> Any help in this area would be greatly appreciated.  I am using Velocity 
Tools 1.1 and Velocity Engine 1.4.
>
> Thank you very much,
> Steve



--
Forio Business Simulations

Will Glass-Husain
[EMAIL PROTECTED]
www.forio.com

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

Reply via email to