How do Play controllers inject variables with the proper name into templates?

In the Play getting started docs, they show this controller:

public static void index() {
  Post frontPost = Post.find("order by postedAt desc").first();
  List olderPosts = Post.find("order by postedAt desc").from(1).fetch(10);
  render(frontPost, olderPosts);
}

Then, in the template the frontPost and olderPosts are used without any special mapping!

${frontPost.title}

How is Play preserving these names?

11
задан SBerg413 27 September 2013 в 21:28
поделиться