I am working on a project using PlayFramework 2.0. After reading a bit of scala, I would like to embed some dynamic code in the View template. So, I did the following:
@{ def getMystring(sequence:Int) = { if(patternForm != null && patternForm.get().windowTreatments != null && patternForm.get().windowTreatments.size() >= sequence + 1) sequence+"" else "" } } <input type = "text" value = @getMystring(1)></input> ...
I was sure that this would work, but instead I got the message "not found: value getMyString Error". Did I do something obviously wrong?
Wei ma
source share