Tuesday, 10 September 2013

How to use Play Frame work Iterating?

How to use Play Frame work Iterating?

I try to do a PlayFramework tutorial , but i fail.
index.scala.html:
Compilation error
not found: type Customer
In C:\test\app\views\index.scala.html at line 2.
@main("welcome") {
@(customer: Customer, orders: List[Order])
<h1>Welcome @customer.name!</h1>
<ul>
@for(order <- orders) {
<li>@order.getTitle()</li>
}
</ul>
}
Application.java:
public static Result index() {
response().setContentType("text/html");
return ok();
}
Please answer.Too many googling but i can't.

No comments:

Post a Comment