I have a simple view (Play! template) that accepts an Html object. I know now that this object is play.twirl.api.Html (in Java). In the controller I want to render.
return ok(layout.render("<h1> something </h1>"));
I'm using Play! 2.3.x
But I fail to find a valid conversion from String to Html. I've tried casting and setting the String as the ctor argument for a new Html object but all failed. I have found no documentation on the twirl api.
Here is my question: How do I convert a String to Html in Play! (Java) without changing the template?