Re: CompoundPropertyModel and FormComponent

2012-01-18 Thread Andrea Del Bene
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

RE: CompoundPropertyModel and FormComponent

2012-01-18 Thread Schlärmann , Bob
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

Re: CompoundPropertyModel and FormComponent

2012-01-16 Thread Andrea Del Bene
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

RE: CompoundPropertyModel and FormComponent

2012-01-16 Thread Schlärmann , Bob
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();

Re: CompoundPropertyModel and FormComponent

2012-01-16 Thread Andrea Del Bene
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

RE: CompoundPropertyModel and FormComponent

2012-01-16 Thread Schlärmann , Bob
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: CompoundPropertyModelHomePage model = new