小编Man*_*anu的帖子

播放2:模板中的"对表单的引用是模糊的"错误消息

我试图按照书中的代码示例构建一个play2应用程序:我在创建一个具有以下定义的表单模板时遇到困难:@(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>
    }
 }
Run Code Online (Sandbox Code Playgroud)

我得到以下eclipse(我安装了scala ide插件)

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._
Run Code Online (Sandbox Code Playgroud)

我应该忽略这条消息吗?play compile运行正常,但我没有从表单中获得任何输出.

eclipse scala playframework-2.0

11
推荐指数
1
解决办法
2113
查看次数

标签 统计

eclipse ×1

playframework-2.0 ×1

scala ×1