[英]How to set class name in TextArea in Play2 Framework Scala template?
這就是我在scala模板中創建textArea的地方
@textarea(Form("content"),args = 'rows -> 10, 'cols -> 80)
我希望我的textArea有我的自定義類名,但我沒有弄清楚如何從文檔中做到這一點: http : //www.scala-lang.org/api/current/index.html#scala.swing.TextArea
那不是你想要的文件。 你鏈接的那個是Swing。 這適用於Play Framework的HTML幫助程序: http : //www.playframework.com/documentation/api/2.0/scala/views/html/helper/package.html
你想要的是這樣的:
@textarea(Form("content"),
args = 'rows -> 10, 'cols -> 80, 'class -> "my-class")
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.