I have been trying to figure out if having a Component as a class member
(and especially inside a Model) will cause it to be serialized mutliple

>From what I have gathered so far, stateful pages always serialize their
components. But is there a danger of serializing the Component more than
once? Or is wicket smart enough to only hold references to the serialized
instance after the first serialization?

 For example, take the following model:

public class VisibilityModel extends Model<Boolean> {

private final Component component;

VisibilityModel (Component component) {
this.component = component;

public Boolean getObject () {
return component.isVisible();

public void setObject (Boolean object) {

Will the Component be serialized again with the model, or will wicket only
hold a reference to the already serialized instance of the component?

Thank you in advance

Reply via email to