Thanks Ross! that works.

On Aug 12, 1:59 pm, Ross Mellgren <dri...@gmail.com> wrote:
> BindHelpers.currentNode is a Box[NodeSeq] that gives you the node that  
> bind is currently replacing.
>
> -Ross
>
> On Aug 12, 2009, at 11:02 AM, jon wrote:
>
>
>
>
>
> > Hi,
>
> > I actually solved by wrapping the node i cared about in another node,
> > but tried the FuncBindParam and it does seem to only grab the child
> > nodes.
>
> > On Aug 11, 11:37 pm, Naftoli Gugenheim <naftoli...@gmail.com> wrote:
> >> Doesn't the FuncBindParam only get the element's child NodeSeq?
>
> >> -------------------------------------
>
> >> David Pollak<feeder.of.the.be...@gmail.com> wrote:
> >> On Mon, Aug 10, 2009 at 1:44 PM, jon <jonhoff...@gmail.com> wrote:
>
> >>> Hi,
>
> >>> I have a template with the following
>
> >>> <lift:Snippit>
> >>>  <t:name shorten="true" />
> >>>  <t:foo form="POST">
> >>>    <form:name/>
> >>>    ...
> >>>  </t:foo>
> >>> </lift:Snippet>
>
> >>> And a snippet like:
>
> >>> def doSnippet(x:NodeSeq):NodeSeq = {
> >>>  bind("t", x,
> >>>    "name"-> (doName(_)),
>
> >> try:
>
> >> def myFunc(node: NodeSeq): NodeSeq = if ((node \ "@shorten").isEmpty)
> >> longVersion else shortVersion
>
> >> bind("t", x, FuncBindParam("name", myFunc _))
>
> >> You get the complete <t:name shorten="true"/> passed to myFunc.
>
> >> Thanks,
>
> >> David
>
> >>>    "foo" -> (doForm(_))
> >>>  )
> >>> }
>
> >>> In the code above only the contents of the bound tags are available
> >>> for doName and doForm, if I want to be able to read the attribute
> >>> "shorten" in doName and have "foo" render with an enclosing <form>
> >>> tag,  how do I create the bind params?
>
> >>> I am doing an expensive batch operation upfront, so I want  
> >>> everything
> >>> to be in the same snippet.
>
> >>> Thanks,
>
> >>> Jon
>
> >> --
> >> Lift, the simply functional web frameworkhttp://liftweb.net
> >> Beginning Scalahttp://www.apress.com/book/view/1430219890
> >> Follow me:http://twitter.com/dpp
> >> Git some:http://github.com/dpp
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to