编译期间出错:twitterBootstrap 不是包 views.html.helper 的成员
Error during compilation : twitterBootstrap is not a member of package views.html.helper
我正在学习 playframework。我正在使用 plaframework 2.5。出现以下错误:
对象 twitterBootstrap 不是包 views.html.helper
的成员
代码:
@(productForm: Form[Product])
@import helper._
@import helper.twitterBootstrap._
@main("Product form") {
<h1>Product form</h1>
@helper.form(action = routes.Products.save()) {
<fieldset>
<legend>Product (@productForm("name").valueOr("New"))</legend>
@helper.inputText(productForm("ean"), '_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 class="btn" href="@routes.Products.index()">Cancel</a>
}
}
Play bootstrap 集成跟不上 Twitter Bootstrap 的速度,因此被删除了。最好的 Bootstrap 集成是
https://adrianhurt.github.io/play-bootstrap/
一般来说,如果你去掉'@import helper.twitterBootstrap._'行就可以了。
我正在学习 playframework。我正在使用 plaframework 2.5。出现以下错误:
对象 twitterBootstrap 不是包 views.html.helper
的成员代码:
@(productForm: Form[Product])
@import helper._
@import helper.twitterBootstrap._
@main("Product form") {
<h1>Product form</h1>
@helper.form(action = routes.Products.save()) {
<fieldset>
<legend>Product (@productForm("name").valueOr("New"))</legend>
@helper.inputText(productForm("ean"), '_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 class="btn" href="@routes.Products.index()">Cancel</a>
}
}
Play bootstrap 集成跟不上 Twitter Bootstrap 的速度,因此被删除了。最好的 Bootstrap 集成是
https://adrianhurt.github.io/play-bootstrap/
一般来说,如果你去掉'@import helper.twitterBootstrap._'行就可以了。