Re: Syntax for calling methods on view model bound to spark template?

Skip to first unread message


Nov 13, 2012, 7:05:42 AM11/13/12
Hey Mike,

Is there any way you can put some of the code up in a gist so that I can get a clearer picture?

Lastly, is there a particular reason you're prefixing Model properties and methods with a # ? The syntax would usually be ${Model.PropertyName} or ${Model.MethodName()} so I'm not sure what you're trying to achieve with the # in front.


On Friday, November 9, 2012 4:30:49 AM UTC, Mike Perry wrote:
Hello, I have searched for hours on this - maybe you can provide an answer. So Im using spark view engine and I have a need to call a method on the object I bind to a template. So far I know I can use ${#PropertyName} to render properties from the view model DTO, however, if I try ${#MethodName()}, I get errors like 'method expected' or 'MethodName does not exist in the current context'. Is there a separate syntax to call methods on the DTOs bound to spark views?

Thanks in advance.

Reply all
Reply to author
0 new messages