0

I've got a template that takes one param that is an Option:

@(overlappingDates: Option[List[Date]])

How do I render this template from a Java Controller?

I've tried:

return ok(template.render(scala.None$.MODULE$));

But this gives the following compile error:

[error]   required: Option<List<Date>>
[error]   found: None$
user3346601
  • 1,019
  • 1
  • 11
  • 18
  • Notice the difference:scala> val x = scala.None x: None.type = None scala> val x: Option[Int] = scala.None x: Option[Int] = None – Andrew Cassidy Jun 04 '14 at 15:22

1 Answers1

0

Have you tried doing it one of these ways:

scala.Option.apply(null)

or

scala.Option.apply((List<Date>) null)

see this answer: https://stackoverflow.com/a/3720044/2873727

Community
  • 1
  • 1
lgasior
  • 310
  • 1
  • 3
  • 11