play! framework use subpackages in models dir have problem
that is say if you want to use 'com/qingfeng/billing' package in play! framework's models dir
you will get a "type not found" error during compiling , in the first line of your views' template.
that's a type not found error , import will make no sence, but fully-qualify the parameters' class type
like this:
@(reses: List[com.qingfeng.billing.Resource])
@main("Welcome to Play 2.1") {
<ul>
@for(task <- reses) {
<li>
@task.name
@task.scname
@task.unit
</li>
}
</ul>
}
在模型目录下使用子包时,模板文件中的参数的类型请使用包的全路径,否则报 type not found 的错误,导致编译不通。
reference:http://stackoverflow.com/questions/16402582/models-subpackages-in-play-framework