Hi all, I have my controller that has to render the home view only. I can’t figure out to create a result to render my simple html page. No scala, no templates, no hard-coding, only returning my view from the views directory.
Regards
Daniele
That’s right. Therefore I’m experiencing problems using ok(any-of-my-views.render()) because of compilation problems. I work with eclipse and the only view that works is the one created by using “play new my-project-name”. Anyway also the default “return ok(index.render())” give compilation problem in eclipse.
Maybe it’s just a enviroment configuration problem, if anyone can help, it’s much appreciated.
Kind regards
Daniele
Da: play-fr...@googlegroups.com [mailto:play-fr...@googlegroups.com] Per conto di biesior
Inviato: sabato 31 marzo 2012 22:51
A: play-fr...@googlegroups.com
Oggetto: [play-framework] Re: [2.0] How to render a view, java controller
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/5N41sAanAcMJ.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
Hi all, there were a compilation problem because of not including the classes_managed directory where scala classes are. Then I expected that play automatically builds my new views, but it does not. So I have to launch the compile command from console for having my scala classes compiled, and that’s really annoying! If anyone can figure out how to tell play to build the classes I’m working on eclipse please tell.
Kind regards
Daniele
P.S.: Anyone had the Global class problem that it runs the onStart on every request but when the application come up?
Da: play-fr...@googlegroups.com [mailto:play-fr...@googlegroups.com] Per conto di biesior
Inviato: domenica 1 aprile 2012 11:32
A: play-fr...@googlegroups.com
Oggetto: [play-framework] Re: [2.0] How to render a view, java controller
ellou' Daniele
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/HQRlJ_NBS8AJ.
This works for me with Indigo (ymmv):
Never build in Eclipse - causes too many conflicts and eclipse gets
badly (and permanently) out of sync far too easily, so turn off
autobuild and autorefresh.
Set options in General|Workspace: Auto build - OFF, Refresh with hooks
+ polling OFF, Refresh on access ON
Make sure target/scala-2.9.1/classes_managed is present in referenced
libraries (this gets added by play eclipsify, so it shouldn't be a
problem)
In play type
~run
The "~" forces auto recompilation. So your templates will be compiled
and ready in the classes_managed folder when you need them in eclipse.
Also you can review your changes in your browser almost immediately.
If your changes are not showing in eclipse immediately, refresh the
project node, and the red squiggles should go away.
If eclipse gets badly out of sync, then the best thing to do is to
remove the project from eclipse, delete all the eclipse specific
settings from your project folder (./.settings), then play clean
eclipsify
if you want all library sources included, use play clean eclipsify
with-source=true
Then import your project into your eclipse workspace again.
hth.