hakandilek / play2-crud

Simple CRUD & DAO implementation for play2
Other
142 stars 52 forks source link

value RouterCrudController is not a member #39

Closed jaroinz closed 10 years ago

jaroinz commented 10 years ago

Hi there, I'm trying out play2-crud. So far I've run the examples in /samples/ and no problem, they work fine. However, when I compile the project in /project-code/ I get the following errors:

[info] Compiling 17 Scala sources and 58 Java sources to /Users/jaro/play/play2-crud/project-code/target/scala-2.10/classes... [error] /Users/jaro/play/play2-crud/project-code/app/play/utils/crud/views/edit.scala.html:13: value RouterCrudController is not a member of object play.utils.crud.routes [error] @form(if(key != null) { play.utils.crud.routes.RouterCrudController.update(model.getName, key + "") } [error] ^ [error] /Users/jaro/play/play2-crud/project-code/app/play/utils/crud/views/index.scala.html:23: value RouterCrudController is not a member of object play.utils.crud.routes [error] @Messages(item) [error] ^ [error] /Users/jaro/play/play2-crud/project-code/app/play/utils/crud/views/list.scala.html:16: value RouterCrudController is not a member of object play.utils.crud.routes [error]

@Messages("crud.createNew")

[error] ^ [error] /Users/jaro/play/play2-crud/project-code/app/play/utils/crud/views/template/layout.scala.html:13: value Assets is not a member of object play.utils.crud.routes [error] [error] ^ [error] /Users/jaro/play/play2-crud/project-code/app/play/utils/crud/views/template/menu.scala.html:14: value RouterCrudController is not a member of object play.utils.crud.routes [error] @Utils.appName [error] ^ [error] 5 errors found error Compilation failed

I come from Java and am quite new in Play. I think I'm missing something in my configuration to make it work. Would you spread some light? Thanks

I'm using: play 2.2.2 built with Scala 2.10.3, JDK 7 Cheers

amitjindal commented 10 years ago

I kind of have the similar problem. I am a newbie myself so forgive if this is something stupid.

I am trying something different. I copied the sources in my play project (2.3.1) hoping I can fix the issues and see if I can get this directly integrated.

[error] /workroot/app/play/utils/crud/views/edit.scala.html:13: value RouterCrudController is not a member of object play.utils.crud.routes [error] @form(if(key != null) { play.utils.crud.routes.RouterCrudController.update(model.getName, key + "") } [error] ^ [error] /workroot/app/play/utils/crud/views/index.scala.html:23: value RouterCrudController is not a member of object play.utils.crud.routes [error] @Messages(item) [error] ^ [error] /workroot/app/play/utils/crud/views/list.scala.html:16: value RouterCrudController is not a member of object play.utils.crud.routes [error]

@Messages("crud.createNew")

[error] ^ [error] /workroot/app/play/utils/crud/views/template/layout.scala.html:13: value Assets is not a member of object play.utils.crud.routes [error] [error] ^ [error] /workroot/app/play/utils/crud/views/template/layout.scala.html:14: value Assets is not a member of object play.utils.crud.routes [error] [error] ^ [error] /workroot/app/play/utils/crud/views/template/layout.scala.html:15: value Assets is not a member of object play.utils.crud.routes [error] [error] ^ [error] /workroot/app/play/utils/crud/views/template/layout.scala.html:16: value Assets is not a member of object play.utils.crud.routes [error] [error] ^ [error] /workroot/app/play/utils/crud/views/template/layout.scala.html:17: value Assets is not a member of object play.utils.crud.routes [error] [error] ^ [error] /workroot/app/play/utils/crud/views/template/layout.scala.html:46: value Assets is not a member of object play.utils.crud.routes [error] [error] ^ [error] /workroot/app/play/utils/crud/views/template/layout.scala.html:47: value Assets is not a member of object play.utils.crud.routes [error] [error] ^ [error] /workroot/app/play/utils/crud/views/template/layout.scala.html:48: value Assets is not a member of object play.utils.crud.routes [error] [error] ^ [error] /workroot/app/play/utils/crud/views/template/layout.scala.html:49: value Assets is not a member of object play.utils.crud.routes [error] [error] ^ [error] /workroot/app/play/utils/crud/views/template/layout.scala.html:50: value Assets is not a member of object play.utils.crud.routes [error]

I even tried to change this by removing routes in this but it didn't help (obviously).

So I am confused. Why does this code has routes in it when there does not seems to be any such package. If this is referring to the "routes" file then that also does not have the same naming/package. So how will this resolve?

Please help.

hakandilek commented 10 years ago

How do you compile? Which play version on which platform? Which version of play2-crud?

If you can provide some details, I can try to help.

amitjindal commented 10 years ago

Hi, I was using 2.3.x version. To compile: activator compile

jaroinz commented 10 years ago

hi there, at the end I gave up on that example. I´ve started following a book instead in my spare time, decided to learn scala and use it for a small project.

On 18 September 2014 13:15, Amit Jindal notifications@github.com wrote:

Hi, I was using 2.3.x version. To compile: activator compile

Reply to this email directly or view it on GitHub https://github.com/hakandilek/play2-crud/issues/39#issuecomment-56063203 .

hakandilek commented 10 years ago

@amitjindal integration is quite straightforward. please upgrade to the latest play2-crud version and use one of the sample projects as your starting point.

hakandilek commented 10 years ago

@jaroinz i wish you luck on your journey. :+1: