1
votes

This is what I have in my scala template where I am creating my textArea

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

I want my textArea to have my custom class name but I failed to figure out how to do that from documentation: http://www.scala-lang.org/api/current/index.html#scala.swing.TextArea

1

1 Answers

3
votes

That's not the documentation you want. The one you linked to is for Swing. This is for Play Framework's HTML helpers: http://www.playframework.com/documentation/api/2.0/scala/views/html/helper/package.html

What you want can be done like this:

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