Hi,
I'm still a Scala and Lift novice but I really like what I see so far.
I'm using 0.10-SNAPSHOT.
I have a database entity called "Blog". For a new instance "blog" I
show the form with b.toForm(). I've found the redo snippet parameter.
If the data was invalid for the submit, redo is executed. But now the
original data is lost.
1. How can I show the data the user entered in the form?
2. What does the NodeSeq parameter for the redoSnippet do? For now I
just passed it on.
3. How do you put the error message to the field?
Here's my code (snippet class BlogUtils):
def create(xhtml: Group): NodeSeq = {
def redo(n: NodeSeq) = this.create(<xml:group>{n}</xml:group>)
User.currentUser.map(u => {
val b = u.createBlog
table(b.toForm(Full("Create"), redo _, handleSubmit _))
}) openOr {S.warning("There's no user logged in.");
NodeSeq.Empty}
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---