How to pass optional parameter to scala template in play framework 2
playframework-2.0, scala
Solution
In Play Framework 2 for Java the controller have to pass a default value or null. In other templates you can leave the optional parameter away.
Problem
Is it possible for the java controller in playframework 2 to pass optional parameter to the scala page? I have a scala page which I'm rendering from different actions. only in a certain case one of these actions is supposed to pass a parameter to the scala, do i have to change every render call? basically i want to call template.scala.html in 2 ways ``` template.render(msg) //java ``` and ``` template.render()//java ``` where in my template i have this: @(msg:String = "xyz") currently i get an error for call with no message that it doesn't render(java.lang.String) in views.html.template cannot be applied to ()