play 2: "reference to form is ambiguous" error message in template
eclipse, playframework-2.0, scala
Solution
To correct the eclipse error I had to insert
@(productForm: play.data.Form[Product])
instead of:
@(productForm: Form[Product])
Problem
I am trying to build a play2 application following code examples from a book: I am stumbling on creating a form template with the following definition: @(productForm: Form[Product]) ``` @main("Product Form") { <h1>Product Form</h1> @helper.form(action = routes.Products.save()) { <fieldset> <legend> Product (@productForm("name").valueOr("new"))</legend> @helper.inputText(productForm("wan"), '_label -> "EAN") @helper.inputText(productForm("name"), 'label -> "Name") @helper.textarea(productForm("description"), '_label -> "Description") </fieldset> <input type"submit" class="btn btn-primary" value="Save"> <a a class=btn" href="@routes.Products.list()"> Cancel </a> } } ``` I get the following eclipse (I have the scala ide plugin installed) ``` Multiple annotations found at this line: - reference to Form is ambiguous; it is imported twice in the same scope by import play.data._ and import play.api.data._ ``` Should I ignore the message ? `play compile` runs fine, but I don't get any output from the form.