Hi,

On Fri, Apr 12, 2013 at 1:03 AM, Frank Henningsen <[email protected]>wrote:

> In a Panel I use a detachable model: I implement an IModel that retrieves
> and
> detaches an object that is not serializable. That works fine.
> If I add the DebugPanel to the WebPage containing my Panel the DebugPanel
> calculates the page size using #sizeOf(). This method requires also my
> non-serializable object to be serializable and hence throws a
> notserializableexception. I do not want to make the object serializable
> just
> because of the DebugPanel. Is there an easy way to avoit that?
>
>
Can't you make this field 'transient' ?
This way it will be excluded in serialization process.


>  >
> >
> >The default implementation of #sizeOf() uses Java Serialization to
> >calculate the size of an object, so it *must* be Serializable.
> >Please explain more about your concerns.
> >
> >
> >On Thu, Apr 4, 2013 at 11:46 PM, Frank Henningsen &lt;frank@&gt;wrote:
> >
> >> This behavior of "sizeOf()" would require detachable objects to be
> >> serializable, just to use the DebugPanel. I would like to avoid that.
> >> Would
> >> your suggestion (rendering the DebugPanel as last componen) be a good
> >> workaround? How can I guarantee that the DebugPanel is rendered as last
> >> component? E.g. over panels or inheritance?
> >>
> >>
> >> >It wouldn't be a problem if debug bar was the "last" component to be
> >> >rendered... I do agree information is  misleading without detaching.
> >> >
> >> >On Tue, Nov 13, 2012 at 4:06 PM, Martin Grigorov
> >> &lt;mgrigorov@&gt;wrote:
> >> >
> >> >> Only if you use the debug bar.
> >> >> Currently the showed size is misleading IMO.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Devutils-sizeOf-tp4653827p4657909.html
> Sent from the Forum for Wicket Core developers mailing list archive at
> Nabble.com.
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Reply via email to