2012-01-31 30 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