Skip to content

Instantly share code, notes, and snippets.

@fmpwizard
Created May 24, 2011 03:44
Show Gist options
  • Save fmpwizard/988112 to your computer and use it in GitHub Desktop.
Save fmpwizard/988112 to your computer and use it in GitHub Desktop.
case object MyTabGroup extends RequestVarSnapshotGroup
object MyVar1 extends SnapshotRequestVar(MyTabGroup, "foo")
object MyVar2 extends SnapshotRequestVar(MyTabGroup, 42)
def render = {
/**
* when this function is applied,
* it will restore the values of all the members of the MyTabGroup
*/
val snapshot: () => Unit = RequestVar.snapshot(MyTabGroup)
...
"type=hidden" #> SHtml.hidden(snapshot) &
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment