I have never used Sitemesh or Wicket on a real project, although I've played with both and they both seem to work exactly as advertised -- now I'm trying to use them both together on a real project for the first time and I'm having a problem.  The problem only happens when I'm accessing a wicket-generated page that has a sitemesh decorator applied to it -- everything works fine if I turn off sitemesh or if I access a non-wicket-generated page through sitemesh.  The problem is that fairly often when I access a wicket-generated page through sitemesh the output appears as if the wicket-generated page was truncated -- for example if my wicket generated page were this:

<body>
1
2
3
4
5
</body>

And my decorator was:

<body>
<decorator:body/>
</body>

Then the output would be something like this:

<body>
1
2
3
</body>

The sitemesh template always shows up in it's entirety, but the wicket page is cut short.  If I do a refresh this will almost always fix it -- I also haven't been able to re-create the problem with one of wicket's bookmarkable pages, so it makes debugging the problem difficult.  

My guess is that maybe there is a problem with wicket returning the wrong content-length or something -- but it appears to generate the appropriate values when I run it outside of sitemesh.

I'm going to try to get my environment set up in a debugger so that I can debug the entire application with source for wicket and sitemesh attached and see if I can track down the problem, but I thought I would post here (and to the sitemesh forums) first and see if anyone had encountered the same or similar problem and already solved it -- or if anyone has any suggestions for where to start.

Thanks,
-
John

Reply via email to