If you're referring to the Exploring Lift book, have a look at Section "3.11.1 Binding Values in Snippets" where it explains bind. (I'm new to Lift myself and hopefully not leading you astray.)
1. myFunc's "html" parameter is fed "automatically" by the HTML Lift Template. In the follow example, everything between <lift:SomeClass.myFunc> and </lift:SomeClass.myFunc> is passed to myFunc. <lift:surround with="default" at="content"> <h2>Hello World</h2> <lift:SomeClass.myFunc form="POST"> <p> Some Text <hello:description /></p> <hello:button /> </lift:SomeClass.myFunc> </lift:surround> 2. "hello" is a prefix for referring to template elements by name. The HTML Lift template should have some like <hello:button /> which will get replaced by the evaluation after "->" within bind(). 3. I'm not sure what you mean "How does the div work". On Sep 13, 10:24 pm, jack <jack.wid...@gmail.com> wrote: > Could somebody please explain to me how this example from the book > works. > > def myFunc(html:NodeSeq):NodeSeq = { > bind("hello",html,"button" -> > ajaxButton(Text("Press me"), > { () => > println("Got an Ajax call.") > SetHtml("my-div", Text("That's it")) > }) > ) > } > > In particular, what do I pass in as the html parameter? > What is 'hello'? > How does the div work? > > I don't understand 'bind'. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@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 -~----------~----~----~----~------~----~------~--~---