How should Wicket react to this?

public MyPage() {
   add(new MyForm("form", new CompoundPropertyModel(null)));
}

public class MyForm extends Form {
   public MyForm(String id, IModel model) {
       super(id, model);
       add(new TextField("name"));
   }
}

This is what you propose... How should Wicket on submission populate the name field? How can we 'decide' that this is a Person object? If you go this way, then you are back in parsing request parameters by hand again... Go Struts!

Martijn


Eelco Hillenius wrote:

Unfortunately, I don't own an Apple. Martijn does though :)

I don't agree with Martijn actually. Like I said, we have had
developer discussions about this before. I think we should allow nulls
in all our models. I can't see anything wrong with that. Just an
'empty' case. And even if we decided (like it seems we did) that nulls
are not allowed, we should /fail fast/ instead of not until the actual
model object is requested. And as that is not something that is
possible at construction time a lot of times, I think we should make
sure we allow nulls.

Eelco


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to