This could be a stupid question or I am going about this in the wrong way, but here is the scenario.I have a ajax button which changes some state on the server side. For example the ajax button changes a user to an administrator and the side column changes. I then want to rerun a snippet on the page and change the existing html to the new html. Can snippets be run in this fashion/ is this possible/ should I be doing this another way?
Thanks in advance,Reuben--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Not stupid at all, I'm not sure how many people on this mailing list
would have thought of including a whole template using setHtml
>> I have a ajax button which changes some state on the server side. For
[cut]
> Sure.
>
> If you do something like SetHtml("sideThingId", <lift:MySnippet/>) Then
> MySnippet will be run.
>
> If you want to run a template:
>
> SetHtml("sideThingId", S.runTemplate("foo" :: "bar" :: Nil)) // load the
> /foo/bar.html template
This is pretty cool, I didn't know you could do this, but when I tried
it I had to modify it a bit:
S.runTemplate("liftactorform" :: Nil) map { x => partialUpdate
(SetHtml("state", ( x ))) }
otherwise I got a compiler error:
[error] found : net.liftweb.common.Box[scala.xml.NodeSeq]
[error] required: scala.xml.NodeSeq
Thanks!
Diego
--
Diego Medina
Web Developer
(305) 788-4954
di...@fmpwizard.com
http://www.fmpwizard.com