We've been discussing a typesafe property model before, and I'd like
to see where the current crop of such APIs and suggestions is. With
Wicket 1.4 imminent, and our migration to Java 5 this should be much
more easy to implement than before.
One such library is
http://code.google.com/p/logicalpractice-collections/ where they make
selectors available on standard collections.
Using their library one can write the following:
smiths = select(from(people).getLastName(), equalToIgnoringCase("smith"));
Putting my Wicket head on, I think something like:
bind(new Label("foo")).to(person).getLastName());
or
add(new Label("foo").bind(person).getLastName());
Would be nice.
Not sure how this jives with our desire to remove the default model
slot. I think having a binding API might nicely coincide with removing
a default slot. The details of this are left as an exercise to the
reader ;-)
Martijn