Fix for issue 56: Add lazy loading on lift
Updated 2 years, 2 months ago
| Marius Danciu | Reviewers | ||
| marius-wip-issue-56 | |||
| 56 | dchenbecker, dpp, marius, charles, joni, atsuhiko, jorge, naftoli, kris, indrajit, alexb | ||
| None | LiftWeb-archive | ||
To load lazily a page fragment that may or may not include snippets just wrpa the markup in: <lift:lazy-load> // Some markup here </lift:lazy-load> Thanks to a recent fix made by Dave, during the Ajax calls, the state (RequestVars, StatefulSnippet-s etc) previously set during page rendering pipeline is preserved Ignore the functions submitJsonForm/submitAjaxForm from the diff as they pertain to issue 149, which is also on the review board. :D
Loaded asynchronously a JSON form. Worked well.
Posted 2 years, 3 months ago (November 2nd, 2009, 1:10 p.m.)
I'm not keen on this implementation. If there are multiple items on the page, they will not arrive in order. If they take longer than the Ajax timeout to render, they won't be rendered. I would suggest piggy-backing on the comet mechanism for this such that a short-lived comet component monitors the rendering and returns the component when rendering is complete.
Review request changed
Updated 2 years, 2 months ago (November 14th, 2009, 9:55 a.m.)
-
- added Diff r2
I changed the implementation to use CometActors. Please take a look. It is working fine for me.
