I have a List of Objects and want to iterate every Element in this List to get their Id Strings. Those Strings must be saved into another List. I always get this Compiler Error:
[error] FilePath:line:64: illegal start of simple expression
[error] @var formNameList : Array[String] = new Array[String](formList.size())
[error] ^
[error] File Path:69: ')' expected but '}' found.
[error] }
[error] ^
[error] two errors found
[error] (compile:compile) Compilation failed
[error] Total time: 3 s, completed 05.12.2013 14:03:37
So please guys help, before I drive insane.
My Code:
@var formNameList : Array[String] = new Array[String](formList.size())
@for(i <- 0 until formList.size()) {
@formNameList.add(formList.get(i).getFormId())
}
@views.html.formmanager.showresults(formNameList, formManager)
Im a Newbie in Scala and this is a very simple Task in Java but Scala is such a tough language. Its also very hard to read: What does this .:::, ::: or this <++= mean?