On Fri, Jun 22, 2012 at 11:28 PM, Walter Rugora <[email protected]> wrote:

> Hi,
>
> when I apply the Wicket 1.3 way to determine session size,
> RequestCycle.get().getSession().getSizeInBytes()
> it results in an around 3000bytes value in my case. And adding or
> removing Labels changed the session size.
>
> Now with Wicket 1.5 using
> Session.get().getSizeInBytes()
> session size is 857bytes. And I can add or remove as many Lables as I
> wish, that size stays the same. Obviously I use it wrong. Currently I
> just add the session size result to a Label added to my single WebPage:
> public HomePage(final PageParameters parameters) {
>  ...
>  add(new Label("ssize", String.valueOf(Session.get().getSizeInBytes())));
>  ...
> }
>

Here you're doing it in the constructor.  So, if this is the first page you
visit there won't be any (Wicket) stuff in the session yet.

Have you tried just adding the debug bar to your page?  Add a dependency to
wicket-devutils in your pom.xml and then add(new DebugBar("someID")); to
your page (and add it to the markup obviously).

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*

Reply via email to