Thanks Jeremy, works great!!!

On 23/06/12 23:23, Jeremy Thomerson wrote:
> On Fri, Jun 22, 2012 at 11:28 PM, Walter Rugora <m...@sudus.eu> 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).
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to