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$
1
  • Notice the difference:scala> val x = scala.None x: None.type = None scala> val x: Option[Int] = scala.None x: Option[Int] = None Commented Jun 4, 2014 at 15:22

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.