0
我有一個包名爲IndProcess,在那個包裏我有一個類IndicatorProcess。在這個類中,我有一個子類ExcelInd所以它看起來像這樣IndProcess.IndicatorProcess.ExcelInd。我試圖將一個ArrayList <'ExcelInd'>傳遞給我擁有的Scala模板。代碼如下所示在scala模板中導入一個子類--Play框架
@import IndProcess.IndicatorProcess.ExcelInd
@import helper._
@import java.util._
@(aaa:String,count:Int ,indList: List[IndicatorProcess.ExcelInd])
出現的錯誤是「值沒有找到AAA」所以,即使刪除了AAA,只是通過計算它仍然給了我同樣的error.I覺得我不能導入正常。它無法識別我傳遞的列表的類型。 調用函數看起來像這樣(目前我只發送一個空的ArrayList顯示)
public static Result indicatorBrowse(){
return ok(indicatorUpload.render(0,new ArrayList<ExcelInd>()));}
謝謝:)
我試過這種組合。我得到的錯誤是「對IndicatorUpload的引用是模棱兩可的,它在導入views.html和導入控制器中導入了兩次..」所以我改變了頁面名稱,但仍然出現錯誤。 – Incpetor
如果您的頁面曾經被調用IndicatorUpload,並且您有一個名稱相同的控制器,請嘗試在播放控制檯中執行「乾淨」操作。 –