0
votes

I using play 2.04 Java. I've create an additional package named util and a class named Node.java as can be seen below:-

Project tree

I have a view in the views.html.* package called test.scala.html that takes Node as a parameter as in the following:-

@(rootNode: Node[Category]

@rootNode

When the view is rendered I get the error:-

View error

Anatomy of a play 2.0 application states that it's not a problem adding additional packages and classes.

Is there something in the configuration of play that I'm missing?

1

1 Answers

3
votes

Only classes from controllers and models packages are imported to views automatically, so, you need to use the full qualified name of your class, ie util.Node instead of Node:

@(rootNode: util.Node[Category]

@rootNode