I'm about to commit S.skipDocType = true | false. If you set it to true, the <!DOCTYPE .../> will be omitted from the response page. This will allow your AJAX fragements to pull parts of pages from the server. Note that someplace in your snippets, you'll have to set S.skipDocType = true.
Does this address your issue?
On Wed, May 20, 2009 at 5:13 AM, fatu <fab...@gmail.com> wrote:
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." <marius.dan...@gmail.com> 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 <fab...@gmail.com> wrote:
>
> > Timothy,
>
> > thanks for the links, I found them useful and I find your blog in
> > general very interesting. Came across scala-blogs.org <http://scala-blogs.org> and it looks
Hi David,
yes it will do, thank you so much for such a lightning-fast
development in reply!
I'm only thinking about a case that is probably much more of an
exception than a rule, i.e. when the snippet dynamically decides if it
needs to generate a full page or a fragment (which is not a very good
design anyway IMHO), for example based on some info passed. But even
in that case the snippet will know that and will be able to set
S.skipDocType = true accordingly, so it should be perfectly fine. Plus
it won't be difficult at all to make the processing diverge in the 2
cases by using URL rewrites, redirecting it to a different template /
snippet depending on parameters or URL structure, which is probably a
better design too.
Right, didn't think about that alternative.
Thanks and best compliments to you and all the active Lift community
for this superb Scala framework! I really think (and hope) it's going
to have a big impact and a tremendous popularity rise in the next
months, especially with more forthcoming books and articles spreading
the word.
...Another question for now :-)
Does it work for views as well?
Yes it does indeed. Sorry, I was getting confused by the fact that
Firefox still doesn't like the fragment but it happens both when using
a view and when using a template + snippet. The DOCTYPE is indeed
missing in both cases when "S.skipDocType" is on, I guess what's still
causing trouble is the fact that the XML declaration is still there.
I think I can remember seeing somewhere (group? blogs?) another flag
that, when turned on, would skip the XML declaration but I can't find
it right now. Is there really such a thing or did I only dream about
it?
Have you pushed this change? Its not showing on github?
Cheers, TimOkay... checked in a change that removes the <?...?> XML header as well
Lift is 2.7.4. We have not upgraded to 2.7.5 as the delta is actor fixes in response to lift-related tickets that we solved with our own actor impl. I'm talking to Philipp Haller today at the Lift Off about how to proceed.
On Jun 6, 2009 6:49 AM, "fatu" <fab...@gmail.com> wrote:
2.7.5 right now (and a fresh maven repo too) but I think (not sure
though) I had it with 2.7.4 as well. Seems to expect a refSet field in
ActorGC which i couldn't find in 2.7.5 sources.
Fabio
On 5 Giu, 18:10, David Pollak <feeder.of.the.be...@gmail.com> wrote: > Are you using Scala 2.7.4 or...
> On Fri, Jun 5, 2009 at 7:37 AM, fatu <fab...@gmail.com> wrote: > > > Fantastic, it works great! > ...