Is there a hook point to serialization of components? We would like to throw a WicketRuntimeException if we detect that we are about to attempt to serialize out an attached (in our case Hibernate) entity rather than using a LoadableDetachableModel and only serializing the id. I see I can register an DetachListener, but that doesn't fire until after the model is detached and that doesn't help in these cases I think. We have had issues where we actually OOM the server when trying to serialize an entity that has LOTS of associations. I'd like to throw the exception before the serialization is even attempted.
We are using wicket 1.4.17.
