[2.0] Compilation error : Cannot find symbol views.html.mypage

947 views
Skip to first unread message

Cyril N.

unread,
Apr 17, 2012, 5:14:28 AM4/17/12
to play-fr...@googlegroups.com
Hi!

I know this question has been asked many times, but I tried all the solution and it still don't work.

Using Eclipse, I added target/scala-2.9.1/src_managed/main in the source path, but I still have this error. (like said here : https://groups.google.com/forum/?hl=fr&fromgroups#!searchin/play-framework/2.0$20eclipse$20scala$20template/play-framework/B7DKDltYmQ8/-nwlx-AGlPIJ)

Here's my code :

public static Result login() {
return ok (
views.html.secure.index(form(Login.class))
);
}

From eclipse, the error is : "views.html cannot be resolved to a type".

And when I go to the browser, here's the error :


Compilation error
cannot find symbol [symbol: class secure] [location: package views.html]

 I tried with views.html.secure.login, secure.login, login, index. Nothing works.

(login.scala.html is in the folder views/secure/login.scala.html, and I have a views/index.scala.html)

Cyril N.

unread,
Apr 17, 2012, 5:18:10 AM4/17/12
to play-fr...@googlegroups.com
Ok sorry for bothering, I forgotten the .render :

public static Result login() {
return ok (
views.html.secure.index.render(form(Login.class))
);
}

!!!
Reply all
Reply to author
Forward
0 new messages