creating views in play framework 2

playframework, playframework-2.0

Solution

You should try:

return ok(views.html.input.form.render(someValue));

or even:

import views.html.input.form;

...
    return ok(form.render(someValue));
...

but in such case it's best to build view's name with package prefix for visual differencing them from views from `views` package `/app/views/input/inputForm.scala.html`:

import views.html.input.inputForm;

...
return ok(inputForm.render(someValue));

Problem

I have created `view.input` package in play framework and then `form.scala.html` file under it. now I want to use redirect in class as below: ``` return ok(form.render(somevalue)); ``` here I am not able to get `form` which I have created under `views` and so I am getting an error. why is it so? Thank you.

Original source