2012-01-31 48 views
3

我定義的播放1.2.4自定義標籤呈現一個表是這樣的:多行代碼1.2.4

*{ in tagTable.html }* 

<table> 
<tr> 
    ${_param1} 
</tr> 
<tr> 
    ${_param2} 
</tr> 
<tr> 
    #{list items: _param3, as: 'item'} 
    <td>${item}</td> 
    #{/list} 
</tr> 
</table> 

但是,當調用點有它給我一個錯誤參數分成多行(每個參數可能有點長,所以我不希望它在一行)。

The template /app/views/example.html does not compile : 

illegal colon after argument expression; solution: a complex label expression before a colon must be parenthesized 

調用網站看起來像:

#{tagTable 
    param1: 'this is some very long content for one line', 
    param2: 'this also is some long content', 
    param3: ['this', 'is', 'a', 'list', 'also'] 
/} 

它工作正常,如果他們是在一行。允許標記定義跨越行的語法是什麼(或者我錯誤地傳遞了其他東西?)

回答

3

這是一個已知的僅在Windows上(在Play的1.2.4版本中)導致問題的錯誤。該錯誤實際上已得到修復,但對於Play 1.2.5的下一個版本。

有關錯誤的更多信息,請參閱https://play.lighthouseapp.com/projects/57987/tickets/107

如果您需要儘快解決問題,那麼您可以嘗試從github下載最新的主版本。

+0

啊,至少有一個解決方法。我是Play新手,並且有些驚訝,但這並沒有起作用。聽起來不錯。 – 2012-01-31 22:33:53