1

这就是我在创建 textArea 的 scala 模板中的内容

@textarea(Form("content"),args = 'rows -> 10, 'cols -> 80)

我希望我的 textArea 有我的自定义类名,但我无法从文档中弄清楚如何做到这一点:http ://www.scala-lang.org/api/current/index.html#scala.swing.TextArea

4

1 回答 1

3

那不是您想要的文档。您链接到的是 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")
于 2013-06-26T06:01:28.520 回答