I have a page with a somewhat lengthy first-time load. So I found
lazy-load that looked handy, but it doesn't seem to work. This is my
template:
<lift:surround with="wide" at="content">
<h2>Udvikling per måned</h2>
<lift:lazy-load>
<lift:performanceChart>
<div class="span-5">
Vis:<br/>
<performance:mapReduce/><br/>
Opdel efter:<br/>
<performance:groupBy/>
</div>
<div class="column span-19 last">
<performance:chart/>
<div id="table"><performance:dataTable/></div>
</div>
</lift:performanceChart>
</lift:lazy-load>
</lift:surround>
Nothing in the performanceChart snippet is rendered when wrapped with
lazy-load (but I see from the logs that the snippet as being called)
If I wait a while, I can see the comet actor shutdown:
15:29:55.096 [ool-2-thread-13] INFO lift
- The CometActor
net.liftweb.builtin.snippet.AsyncRenderComet@131e8e72 Received
Shutdown
What am I missing?
/Jeppe
Can you check with firebug if you get any asynchronous javascript back
from the comet request?
Not easily. When I get some time I'll see if I can reproduce it in a sample.
> Can you check with firebug if you get any asynchronous javascript back
> from the comet request?
It looks a bit strange. The normal request (with not lazy load) is
about 3s. With the lazy load the comet request is almost 60s before
anything (not the correct content) is returned (timed out?)
Hold on! I did some more digging :-) Since this was just a naive
application of lazy-load around an existing snippet, it contained bind
with a few ajaxSelects inside. It seems this is what caused the
problems. If I remove the ajaxSelects it seems to work.
Not sure if this is a supported scenario or not, but if not we should
probably emit some notification when running in dev mode.....or at
least document what can be put inside lazy-load
/Jeppe
lazy-load should be able to wrap anything. I'll try to put in some
ajaxSelects to see if I can repro.
On Mar 8, 10:54 pm, Jeppe Nejsum Madsen <je...@ingolfs.dk> wrote:
I spent some time today in looking to your issue. I was able to
reproduce. The problem was that a NPE was thrown as the S,functionsMap
was not initialized as I was doing a light S init to capture original
request state. I have a fix for it but I need to do some more testing
on it first.
I'll open a ticket for this.
Br's,
Marius
> I opened defect 412 and this is now on the review board:
> http://reviewboard.liftweb.net/r/263/diff/#index_header
Wow, that was fast :-) Thanks for looking into this!
/Jeppe