how to render Play! template javascript dynamically