Skip to content

Instantly share code, notes, and snippets.

@ryanswanstrom
Created December 20, 2010 20:48
Show Gist options
  • Save ryanswanstrom/748955 to your computer and use it in GitHub Desktop.
Save ryanswanstrom/748955 to your computer and use it in GitHub Desktop.
This is a sample page used with the Play Framework. It demonstrates dynamic title, forms, and errors.
#{extends 'main.html' /}
#{set title: "Results: " + iters + ": " + mongoSecs /}
<h1>Speed Results - ${iters} iterations</h1>
<h3>MongoDB (Morphia) </h3>
${mongoSecs} seconds
<h3>Speed Test</h3>
#{ifErrors}
<h4>Oops…</h4>
#{errors}
<li>${error}</li>
#{/errors}
#{/ifErrors}
#{form @Application.speedTest()}
<p>
<label for="iters">Num of Iterations: </label>
<input type="text" name="iters" />
</p>
<p>
<input type="submit" value="Speed Test It!" />
</p>
#{/form}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment