Created
January 25, 2011 19:06
-
-
Save johanprinsloo/795433 to your computer and use it in GitHub Desktop.
lift snippet with lowercase
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <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