我试图按照书中的代码示例构建一个play2应用程序:我在创建一个具有以下定义的表单模板时遇到困难:@(productForm:Form [Product])
@main("Product Form") {Cancel } }Product Form
@helper.form(action = routes.Products.save()) {
我得到以下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._
我应该忽略这条消息吗?play compile
运行正常,但我没有从表单中获得任何输出.
为了纠正我必须插入的日食错误
@(productForm: play.data.Form[Product])
代替:
@(productForm: Form[Product])