Re: [Wicket-user] CompoundPropertyModels

2005-09-14 Thread Martijn Dashorst
Isn't it easier to do the following? ParentModel extends Model { ParentModel() {} protected Object onGetObject(final Component component) { return component.getParent().getModel().getModelObject(); } } On 9/14/05, Johan Compagner <[EMAIL PROTECTED]> wrote: > and why can't

Re: [Wicket-user] CompoundPropertyModels

2005-09-14 Thread Johan Compagner
and why can't a new object not be deatached?? If you have a detachable model with roomID is the thing you store if roomID is filled in then you do a query because you where editting an existing Room object if roomID == null then you just create a new Room object. Ofcourse if you have a multi page

Re: [Wicket-user] CompoundPropertyModels

2005-09-14 Thread Ralf Ebert
Hi, i never had the need to have 2 special models for new and existing objects What is then the difference? The only thing a model really does it getting the modelObject. So what you put in that can be an existing one or just a new Room() Please give a better usecase for this but "getting t

Re: [Wicket-user] CompoundPropertyModels

2005-09-14 Thread Johan Compagner
i never had the need to have 2 special models for new and existing objects What is then the difference? The only thing a model really does it getting the modelObject. So what you put in that can be an existing one or just a new Room() Please give a better usecase for this For now replacing models i

Re: [Wicket-user] CompoundPropertyModels

2005-09-14 Thread Ralf Ebert
Hi, no then it isn't But why are you changing a model itself? Why not just the data? A model itself shouldn't have to change after construction. well, currently I have no use case for this, I just want to model these dependencies in a way which reflect the things I want to express. In thes

Re: [Wicket-user] CompoundPropertyModels

2005-09-14 Thread Johan Compagner
no then it isn't But why are you changing a model itself? Why not just the data? A model itself shouldn't have to change after construction. You can ofcourse work with a ICompoundModel implementation (that you give youre parent) and then resolve everything in that one for all the components that

Re: [Wicket-user] CompoundPropertyModels

2005-09-14 Thread Ralf Ebert
Hi, If you give a PropertyModel a Model as object then it will use that as a nested model If the nested model then updates the properyt model will also used that object. So what problem do you have with that? what if you call setModel(...) on the parent object, which is allowed and reasona

Re: [Wicket-user] CompoundPropertyModels

2005-09-14 Thread Johan Compagner
If you give a PropertyModel a Model as object then it will use that as a nested model If the nested model then updates the properyt model will also used that object. So what problem do you have with that? On 9/14/05, Ralf Ebert <[EMAIL PROTECTED]> wrote: Hi,[original: - when having a page using a C

Re: [Wicket-user] CompoundPropertyModels

2005-09-14 Thread Ralf Ebert
Hi, [original: - when having a page using a CompoundPropertyModel which has a form using a CompoundPropertyModel, how do I get the form's model to map to a property of the page's model? (the pages model is bound to "house", and I want the form's model to be bound to "house.room" so the fo

RE: [Wicket-user] CompoundPropertyModels

2005-09-08 Thread Igor Vaynberg
ECTED] On Behalf Of Ralf Ebert > Sent: Thursday, September 08, 2005 11:26 AM > To: wicket-user@lists.sourceforge.net > Subject: Re: [Wicket-user] CompoundPropertyModels > > Hi, > > > This would be done using: new CompoundPropertyModel(new > > PropertyModel(getPage().ge

Re: [Wicket-user] CompoundPropertyModels

2005-09-08 Thread Ralf Ebert
Hi, This would be done using: new CompoundPropertyModel(new PropertyModel(getPage().getModel(), "room")) However, why don't you create a RoomEditForm, which looks something like this: public RoomEditForm extends Form { public RoomEditForm(String id, Room room) { super(id, n

Re: [Wicket-user] CompoundPropertyModels

2005-09-06 Thread Gwyn Evans
Hava a look at the attatched & see if they help with (1). Basically, there's an example of 'absolute' addressing and an example of 'relative' addressing. I'm not sure if it's the best way, but it works... /Gwyn On 06/09/05, Ralf Ebert <[EMAIL PROTECTED]> wrote: > Hi, > > some questions came upo

Re: [Wicket-user] CompoundPropertyModels

2005-09-06 Thread Martijn Dashorst
On 9/6/05, Ralf Ebert <[EMAIL PROTECTED]> wrote: Hi,- when having a page using a CompoundPropertyModel which has a formusing a CompoundPropertyModel, how do I get the form's model to mapto a property of the page's model? (the pages model is bound to"house", and I want the form's model to be bound t

[Wicket-user] CompoundPropertyModels

2005-09-06 Thread Ralf Ebert
Hi, some questions came upon me while working with Wicket the last days. I couldn't find anything about this in the resources online... Thanks for any help! - when having a page using a CompoundPropertyModel which has a form using a CompoundPropertyModel, how do I get the form's model to