Groovy « playframework « Java Enterprise Q&A

1. Quick PlayFramework / Groovy

Why does the following code always emit 'yes' (in HTML) even when sel has a different value other than 'audio'? (I've logged the values of sel and confirmed different values.) This is ...

2. Why isn't Playframework custom validation message not displayed in template

I am trying to perform some custom validation with play framework but I don't seem to be able to get the error from the template. The controller code is :


3. Why Play! framework chose Groovy for template engine

From their website " The biggest CPU consumer in the Play stack at this time is the template engine based on Groovy. But as Play applications are easily scalable, it ...

4. How to access a Map using playframework template system (groovy)

I've been using the--quite excellent--playframework and have had trouble finding documentation/examples on how to access a Map data structure from a view, using play's template engine. To be even more specific, ...

5. PLay framework Routing with multiple parameters issue

I don't seem to be able to resolve the following scenario where no routes are found. Got my route file with the following entry:

GET     /reports/items/{date}    ...

6. How do I pass an array to a template and then show the content in Play Framework?

Previously I have only used the Scala templates, but now am I using Java and the Groovy templates. I find it hard to understand the Groovy templates. I pass an array from ...

7. play! framework ENUM and Groovy problem

I have something like the following-

public class Woman extends Model {

    public static enum Outcome {

8. Play : Invalid method Code length

I have added one condition on my HTML page that is

#{if userObject == null}
<a href="/login">Text</a>
The code is working fine on the dev mode and getting this error in PROD mode.

9. Dynamic Play! template links

I"m having trouble generating dynamic links from strings. I have a controller which renders a page:

public class ViewController extends Controller {
   public static void index() {

10. Java Play Framework Groovy Scripts within Javascript

I want to perform some AJAX style data retrieval using the Java Play Framework and have come across an issue with the 'route' script syntax. The problem is that in the code ...

11. renderArgs is null in template in play! framework

I have a controller function like this

public static void renderCustomersList() {
In ...

12. How can you use groovy inside Play! Framework, outside of templates?

The FAQ states

Is play a Groovy framework? No. Even if we use Groovy as the base technology for the Play templating system, it’s ...