Re: [Wicket-user] Creating a PropertyModel using a non-IModel POJO

2006-01-25 Thread Dirk Markert
Igor,   thank you. I got it.   Dirk  2006/1/26, Igor Vaynberg <[EMAIL PROTECTED]>: the flexibility is in the extra layer of the modelmaybe you want to use a detachable model for the person so that it is loaded from the database. this is where public MyForm(String id, IModel personmodel)  would come

Re: [Wicket-user] Creating a PropertyModel using a non-IModel POJO

2006-01-25 Thread Igor Vaynberg
the flexibility is in the extra layer of the modelmaybe you want to use a detachable model for the person so that it is loaded from the database.this is where public MyForm(String id, IModel personmodel)  would come in handy. pass in whatever kind of model you want, and the propertymodel will use i

Re: [Wicket-user] Creating a PropertyModel using a non-IModel POJO

2006-01-25 Thread Dirk Markert
Martijn,   where is the big advantage between   public MyForm(String id, IModel personmodel) {   super(id, personmodel);   add(new TextField("name", new PropertyModel(personmodel, "name")));}  and public MyForm(String id, Person person) {   super(id, person);   add(new TextField("name", new Proper

Re: [Wicket-user] Creating a PropertyModel using a non-IModel POJO

2006-01-25 Thread Igor Vaynberg
committed into 1.1 and head branches-IgorOn 1/25/06, Frank Silbermann <[EMAIL PROTECTED] > wrote:My Wicket version is 1.1 -- the latest production version.I was looking on the Constructor Summary, which says: "PropertyModel(java.lang.Object modelObject, java.lang.String_expression_)Construct with a

RE: [Wicket-user] Creating a PropertyModel using a non-IModel POJO

2006-01-25 Thread Frank Silbermann
OTECTED] On Behalf Of Juergen Donnerstag Sent: Tuesday, January 24, 2006 5:21 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Creating a PropertyModel using a non-IModel POJO What is your Wicket version? This is from CVS HEAD * @param modelObject *

Re: [Wicket-user] Creating a PropertyModel using a non-IModel POJO

2006-01-24 Thread Juergen Donnerstag
What is your Wicket version? This is from CVS HEAD * @param modelObject *The model object, which may or may not implement IModel and the whole file does not contain the word OGNL. Actually there is only one file NumericTypes.java which contains the word OGNL. Which m

Re: [Wicket-user] Creating a PropertyModel using a non-IModel POJO

2006-01-24 Thread Martijn Dashorst
Frank, I see your confusion (I think). The javadoc comment for the modelObject parameter says: 'The model object, which may or may not implement IModel' This means that you can use POJO's directly as a parameter, and, IModel objects that wrap an object. For instance, you can do this: new Prop

Re: [Wicket-user] Creating a PropertyModel using a non-IModel POJO

2006-01-24 Thread Igor Vaynberg
hmm, the javadoc for the constructor argument says:@param modelObject     *    The model object, which may or may not implement IModeland the example given in the javadoc of the class itself shows it used with a regular object, so i dont understand where the confusion comes from. the termin