Scala accepts relative packages, this means that if you try to use org like that it refers to the views.org package, you can solve this by providing the fully qualified class name:
@import controllers.org.OrgInfo
题
How to organize folder structures in app/views folder without conflicting with other application folders? For example,
app/
controllers/
org/
OrgInfo.scala
views/
org/
a.scala.html
user/
b.scala.html
I found out that b.scala.html can no longer see org.OrgInfo class. When I do @import org.OrgInfo at b.scala.thml, it throws an error that it can't find OrgInfo under views.html.org. What's wrong?
解决方案
Scala accepts relative packages, this means that if you try to use org like that it refers to the views.org package, you can solve this by providing the fully qualified class name:
@import controllers.org.OrgInfo
其他提示
I think johanandren provided you with the correct answer. So you should not start your import clause from org. org in your case is a sub-package of controllers. Use the absolute package name controllers.org._