Is it possible in Play 2.0, to make use of external model objects in a template?
I can reference model objects from another jar in a Controller class. I don’t know how to reference external model objects inside the Play 2.0 template files.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No problem.
First, add the class to your classpath, either by adding the jar to the lib dir or through the “managed dependencies” in the projects/Build.scala.
Make sure to have fully qualified name when declaring your model class in the template view file.
Inside the template, you can reference any public method or member.