Hi Marius, as I understand them, Jx classes help in generating JS that can itself generate DOM at the client. Am I wrong? I'd really like to serve back an HTML fragment built by using the normal Lift template pipeline (so including surround & bind). Is that possible?
Thanks On 20 Mag, 13:16, "marius d." <[email protected]> wrote: > As I understood you want to make an Ajax request and serve back a > Document Fragment. If so please also take a look at Jx stuff. We > discuss Jx classes in a fairly amount of details in the lift book. > > Br's, > Marius > > On May 20, 9:32 am, fatu <[email protected]> wrote: > > > Timothy, > > > thanks for the links, I found them useful and I find your blog in > > general very interesting. Came across scala-blogs.org and it looks > > quite promising as well. > > > I knew "bind" already from the "Exploring Lift" book which I pull from > > git, build with Lyx and keep at hand regularly. In the doctype post, > > though, I couldn't find a way to specify "no doctype" which I think > > is necessary to serve a fragment; plus I couldn't find any other easy > > "out-of-the-box" way to do it. Shouldn't this use case (serving > > fragments), which I think is quite common, be better / more easily > > supported by the framework? Can someone post an example of how to do > > it with raw response handling in the meanwhile? > > > Thanks anybody. > > > Fabio > > > On 26 Apr, 21:49, Timothy Perrett <[email protected]> wrote: > > > > George, > > > > To tell lift what doctype you want to use see my blog post > > > here:http://is.gd/uJ4L > > > > Also, you'll want to read another one of my posts in which I discuss > > > the bind(...) method and how you can stop putting markup into your > > > snippets:http://is.gd/sfyT > > > > Cheers, Tim > > > > On Apr 26, 1:02 pm, george <[email protected]> wrote: > > > > > hello all, > > > > > hopefully someone can help me out here. > > > > > i am trying to port some simple ajax stuff over to lift from a rails > > > > app. basically it just loads anhtmlfragmentand puts it into the dom > > > > using prototype. > > > > > i have set up a template which contains thefragmentat src/main/ > > > > webapp/fragment.html > > > > > <ul><li>item</li></ul> > > > > > then i made the page available using the SiteMap and all seems good, > > > > but here comes the problem > > > > > the lift response adds the xml declaration and doctype, one of which > > > > seems to cause prototype some problems > > > > > <?xml version="1.0" encoding="UTF-8"?> > > > > <!DOCTYPEhtmlPUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > > > > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > > > > <ul><li>item</li></ul> > > > > > so the question is, how can i make lift send back the rawhtmlwithout > > > > meddling with it? > > > > > i have tried out using ResourceServer to serve it statically which > > > > works, but this wouldn't allow me to generate thefragment > > > > dynamically. > > > > > i would also prefer to have a separatehtmltemplate file rather than > > > > embedding the markup code in a snippet. > > > > > any thoughts gratefully received.. > > > > > george --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---
