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

30 views
Skip to first unread message

RobertTheGrey

unread,
Nov 13, 2012, 7:05:42 AM11/13/12
to spar...@googlegroups.com
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.

Thanks,
Rob

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.

Mike
Reply all
Reply to author
Forward
0 new messages