Given your problem description I figure you bind your ParentObject directly to your components instead of binding a reference to the ParentObject. The serialization/deserialization of session scoped objects (which all pages, components and models in effect are) creates these 'new' instances (even though they are deserialized copies of the original parent object).
While you have not shown much code, I suspect you do something like this:
public MyPage() {
Object parentObject = ((MyApplication)Application.get()).getParentObject();
add(new Label("timer", new PropertyModel(parentObject, "time")));
}
This binds the parent object to the property model, and that binds the parent object to the page (through the label component). What you should do instead is:
public MyPage() {
add(new Label("timer", new PropertyModel(this, "application.parentObject.time")));
}
This binds the page to itself, and instructs the property model to retrieve the application dynamically, and from the application the parent object, and from that the time. This way you don't bind your objects to the page hierarchy, but retrieve them dynamically.
Another option is to use a LoadableDetachableModel that retrieves the parent object from the application, and detaches it after rendering the page.
public class ParentObjectModel extends LoadableDetachableModel<ParentObject> {
@Override public ParentObject load() {
return ((MyApplication)Application.get()).getParentObject();
}
}
See the Wicket wiki for more information on Models.