If you have XML like: <input my:id="foo"/>
you can:

bind("my", xml, FuncAttrBindParam("id", nodeseq => nodeseq ++ Text("bar"),
"id))

And you get:

<input id="foobar"/>


On Wed, Jun 17, 2009 at 10:21 AM, DavidV <david.v.villa...@gmail.com> wrote:

>
> For now I have fixed the problem by calling a new method in my snippet
> that accesses the variable with { } in the input tag.  I would be
> interested to know if there is a way to do this with a bind tag
> directly in the <input> tag in the .html file, because I feel like my
> current solution is a bit of a kludge...
> -David
>
> On Jun 17, 12:00 pm, DavidV <david.v.villa...@gmail.com> wrote:
> > I would like to include a variable value in an <input> tag in my .html
> > file.  I have defined a tag as follows:
> >
> >   def upload(xhtml: Group): NodeSeq =
> >     if (S.get_?) {
> >       bind("ul", chooseTemplate("choose", "get", xhtml),
> >                     "file_upload" -> fileUpload(ul => theUpload(Full
> > (ul))),
> >                     "batch" -> currBatch
> >       )
> >     }
> >
> > thus,
> > <choose:get>
> > <ul:batch/>
> > </choose:get>
> >
> > returns the variable value that I need
> >
> > How can I retrieve this variable for the "value=" attribute of my
> > input tag?  For instance, right now I am trying to do it like this:
> > <input name="batch" type="hidden" value=<ul:batch/> />
> >
> > but that is not working.  It also doesn't work like this:
> > <input name="batch" type="hidden" value="<ul:batch/>" />
> >
> > Thanks,
> > David
>
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://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