789101112131415
private String email; @Override public Person build() { Person person = new Person("Ben", "Verbeken"); person.email = email; return person; }
39404142434445464748
renderArgs.put(argName, "the current time is: " + new Date()); } public static void people(){ renderArgs.put("people", newArrayList( new Person("Alex"), new Person("Ben"), new Person("Caroline") )); }
202122232425262728
public Result index() { return ok(index.render()); } public Result addPerson() { Person person = Form.form(Person.class).bindFromRequest().get(); person.save(); return redirect(routes.Application.index()); }