That looks like a great idea, thanks Harry, I didn't know you could
next stuff like that.

On Dec 7, 3:39 pm, harryh <har...@gmail.com> wrote:
> Another strategy, different from what Ross suggests, that I have found
> useful in some circumstances.  In the view do this:
>
> <lift:YourPage>
>   <page:firstsection>
>     <firstsection:username/>
>     <firstsection:foo/>
>   </page:firstsection>
>
>   <page:secondsection>
>     <secondsection:username/>
>     <secondsection:foo/>
>   </page:secondsection>
> </lift:YourPage>
>
> Then
>
> class YourPage extends RenderSnippet {
>   def render(xhtml: NodeSeq) = {
>     val user = User.currentUser
>
>     def firstSection(xhtml: NodeSeq) = {
>       val foo = whatever
>       bind("firstsection", xhtml", "username" -> user.name, "foo" ->
> foo.name)
>     }
>
>     def secondSection(xhtml: NodeSeq) = {
>       val bar = whatever
>       bind("firstsection", xhtml", "username" -> user.name, "bar" ->
> bar.name)
>     }
>
>     bind("page", xhtml, "firstsection" -> firstSection _,
> "secondSection" -> secondSection)
>   }
>
> }

--

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