1
자바에서 첫 번째 응용 프로그램을 작성하고 있습니다. 내보기 중 하나에서, 나는 도우미 기능의 몇 가지있다 :프레임 워크 체인 다중 스칼라 함수 재생
@**********************************
* Helper generating table columns *
***********************************@
@tableColumn(content:String) = {
<td>
@content
</td>
}
및
@**********************************
* Helper to convert boolean to string *
***********************************@
@convertBooleanToString(flag:Boolean) {
if (flag) {
"Yes"
} else {
"No"
}
}
내가 아래에 있지만 컴파일러 오류가 이러한 두 기능을 사용하려합니다.
<tr>
<td>Completed</td>
@for(item <- items) {
@tableColumn(convertBooleanToString(item.isComplete))
}
</tr>
내가 다음과 같습니다 얻을 오류 :
illegal start of simple expression
당신이 도와 주실 수 있습니까?