Thanks for your response. After some more debugging I've found the cause and
also found a solution.
The cause is that models of intermediate components, such as the Panel in my
case, are never initialized if they do not already have a model.
The parent's model is looked up in Component.initMod
At this point I would override/debug method updateModel() inside
AddressPanel to see if model's object is modified by this method .
Just my 2 cents...
Yes, I think you are doing it "the Wicket way", but your snippet and
mine should work. Do you modify components' model somewhere else?
No, I don
> Yes, I think you are doing it "the Wicket way", but your snippet and
> mine should work. Do you modify components' model somewhere else?
No, I don't think so. The page to which the component is added is constructed
as follows:
CompoundPropertyModel model = new
CompoundPropertyModel(this);
For
Yes, I think you are doing it "the Wicket way", but your snippet and
mine should work. Do you modify components' model somewhere else? Which
model do you get if you call getDefaultModel() inside oninitialize?
Thanks for your reply. I've tried it but it still gave the same error.
However I also
Thanks for your reply. I've tried it but it still gave the same error.
However I also tried the following modified version of your idea:
In AddressPanel.java:
@Override
protected void onInitialize() {
super.onInitialize();
Object o = getDefaultModelObject();
setDe
Hi,
I think you need to build a CompoundPropertyModel inside the component
itself. Override onInitialize method of AddressPanel and try with
something like this:
@Override
protected void onInitialize() {
super.onInitialize();
setDefaultModel(new CompoundPropertyModel(getDe