Re: How to have custom components interact with CompoundPropertyModel?

2011-05-30 Thread Andrea Del Bene
Can you debug onBeforeRender and see if CompoundPropertyModel refers to the original Panel's field containing the calendar? Or model's object is already null? I tried to call getModel() in onBeforeRender() to get hold of the parent's model (the CompoundPropertyModel of the panel) which works.

Re: How to have custom components interact with CompoundPropertyModel?

2011-05-30 Thread huberc
Yes, i can get the CompoundPropertyModel and it refers to the entity containing the calendar. So i was wondering if i should just get the object from the model and throw it in a PropertyResolver. But somehow I have the feeling this would not be the intended way, would it? Can you debug

Re: How to have custom components interact with CompoundPropertyModel?

2011-05-29 Thread huberc
Hi, i tried adding that call in my constuctor but the call to this.getModel() still returns null before and after setType. I figure this should not happen in the constructor at all, right? On Sat, 28 May 2011, andrea del bene wrote: Hi, Have you called setType(Calendar.class) in your

Re: How to have custom components interact with CompoundPropertyModel?

2011-05-29 Thread huberc
I use the following constructor code: public DateDropDownChoice(final String id) { this(id, null); } public DateDropDownChoice(final String id, IModelCalendar model) { super(id); //.. set default values to children

Re: How to have custom components interact with CompoundPropertyModel?

2011-05-29 Thread andrea del bene
You shouldn't care about passing model from parent to child-children. If I understood right your situation you should have a panel (parent of DateDropDownChoice) where you have set a CompoundPropertyModel binded to an object containing a calendar (i.e. setDefaultModel(new

Re: How to have custom components interact with CompoundPropertyModel?

2011-05-29 Thread huberc
You shouldn't care about passing model from parent to child-children. If I understood right your situation you should have a panel (parent of DateDropDownChoice) where you have set a CompoundPropertyModel binded to an object containing a calendar (i.e. setDefaultModel(new

How to have custom components interact with CompoundPropertyModel?

2011-05-28 Thread huberc
Hi all, I am pretty new to Wicket (using 1.4.10) and have some hard time to figure out how the interaction between components and models exactly works. So I was hopeing that someone here could enlighten me or tell me where I should look (WARNING: Rather lengthy post). My particular problem

Re: How to have custom components interact with CompoundPropertyModel?

2011-05-28 Thread andrea del bene
Hi, Have you called setType(Calendar.class) in your custom form component? Does its model remain 'null'? Hi all, I am pretty new to Wicket (using 1.4.10) and have some hard time to figure out how the interaction between components and models exactly works. So I was hopeing that someone here

Re: How to have custom components interact with CompoundPropertyModel?

2011-05-28 Thread James Carman
Please list your constructors of your custom component. I believe the auto-resolving of models from a parent CPM is done during the constructor (the one with just the component id). On Sat, May 28, 2011 at 8:27 AM, andrea del bene andrea.on@libero.it wrote: Hi, Have you called