Skip to content

Instantly share code, notes, and snippets.

@johanprinsloo
Created January 25, 2011 19:06
Show Gist options
  • Save johanprinsloo/795433 to your computer and use it in GitHub Desktop.
Save johanprinsloo/795433 to your computer and use it in GitHub Desktop.
lift snippet with lowercase
<lift:surround with="default" at="content">
<h2>Dynamic Simulation UI - Tree Components...</h2>
<p>
<lift:timestamp.stab>
<span><i>Generated at <b:time/></i></span>
</lift:timestamp.stab>
</p>
</lift:surround>
class timestamp {
lazy val date: Box[Date] = DependencyFactory.inject[Date]
// inject the date
def stab(in: NodeSeq) = {
println(date)
Helpers.bind("b", in, "time" -> date.map(d => Text(d.toString)))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment