[Play 2.0] Scala Templpate parsing error type member in Model

17 views
Skip to first unread message

Sangcheol Hwang

unread,
Apr 14, 2012, 12:24:49 PM4/14/12
to play-fr...@googlegroups.com
Hi

I'm wonder anyone see same error in template.

This is my Model class

@Entity

public class Timeline extends Model {

@Id

public Long id;

@Constraints.Required

public String type;

}

In scala view file I want reference type member like this

@(timeline: Timeline)

<ul>

  <li>@timeline.type


but it's not working, I think type is a reserved word in scala.  I tried like that

@timeline.'type'


It just makes a same error.


Please, let me know how to fix this bug. 

Thanks.


felipeko

unread,
Apr 16, 2012, 9:18:03 AM4/16/12
to play-fr...@googlegroups.com
The token ' is for char, try using ` instead of '.
@timeline.`type`
Reply all
Reply to author
Forward
0 new messages