Hi,

I'm reading the lift book about forms, and in reference to this code:

def add (xhtml : NodeSeq) : NodeSeq = {
var desc = ""
var amount = "0"

def processEntryAdd () { ... }

bind("entry", xhtml,
"description" -> SHtml.text(desc, desc = _),
"amount" -> SHtml.text(amount, amount = _),
"submit" -> SHtml.submit("Add", processEntryAdd))
}

am coming across:

"That means that if you want to retain values between submission and
re-rendering of the form, you’ll want to
use RequestVars (Section 3.16) or a StatefulSnippet (Section 3.11.2)
instead ."

What's the purpose of RequestVars and StatefulSnippet? I thought the
values were retained anyway through POST. That is, on submit, the
functions "desc = _" and "amount = _" were executed and the so the
state was kept...

Are those functions only executed after the bind is complete? There
must be something I'm missing here.

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.

Reply via email to