Thanks David. Here is my repository: git://github.com/daiwhea/MapperBBS.git
In fact, I want to share this simple demo project for the newbies like myself when the project completed. On Jan 6, 11:42 am, David Pollak <feeder.of.the.be...@gmail.com> wrote: > The easiest thing to do is for you to post your project as a complete > runnable whole to GitHub (just make a public repository). > > I'll clone the repository, fix the issue and you'll see the diff and have a > running project. Sound good? > > > > On Tue, Jan 5, 2010 at 6:32 PM, daiwhea <daiw...@gmail.com> wrote: > > > On Jan 5, 10:18 pm, Naftoli Gugenheim <naftoli...@gmail.com> wrote: > > Just move var localNote ... to before def doReply() ... > > > ------------------------------------- > > > Thanks Naftoli. It does save a reply to the db after I move var > > localNote to before def doReply(). But It will only save reply to the > > last note even when I try to reply to the note in the top section. > > > So, in order to see what happend, I add "<lift:embed what="/templates- > > hidden/gbook/replyForm" />" no matter the note was replied or not. > > When the page loaded, I saw all the textareas in each reply form has > > the same reply content of the last note. But both those textareas and > > submit buttons have different names. Seems lift doesn't deal the > > embeded template content in the snippet properly as wished. > > > I also test to add "eager_eval="true"" to the list template as: > > <lift:GuestBook.list eager_eval="true">. But this won't help. > > > Thanks for your time. You're so warmhearted. ^_^ > > > def replyNote(html: NodeSeq): NodeSeq = { > > > val localNote = curListNote > > > def doReply() = { > > localNote.save > > } > > > bind("note", html, > > "replyContent" -> SHtml.textarea(localNote.replyContent, > > localNote.replyContent(_)), > > "submit" -> SHtml.submit("Reply", doReply) > > ) > > } > > > private def getReplyContent(item: GuestNote) = { > > if (item.repliedByAdmin == 0) { > > <div><p>Not replied by admin</p><p>{item.replyContent}</ > > p><lift:embed what="/templates-hidden/gbook/replyForm" /></div> > > } > > else > > <div><p>{"Replied by admin at: "+item.replyTime}</p><p> > > {item.replyContent}</p><lift:embed what="/templates-hidden/gbook/ > > replyForm" /></div> > > } > > > -- > > 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<liftweb%2bunsubscr...@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/liftweb?hl=en. > > -- > Lift, the simply functional web frameworkhttp://liftweb.net > Beginning Scalahttp://www.apress.com/book/view/1430219890 > Follow me:http://twitter.com/dpp > Surf the harmonics
-- 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.