Hi, On Wed, Oct 10, 2012 at 7:42 PM, Dan Retzlaff <[email protected]> wrote: > 2. Igor's bindgen-wicket: http://code.google.com/p/bindgen-wicket/
We use a modified version of this one which inherits from PropertyModel. PropertyModel has a few nice features, especially the fact that it's trying to call the default constructor of the object when it finds a null property on /set/ operations (the model of bindgen-wicket throws an NPE). It's especially useful when you use @Embedded/@Embeddable. So we wrap PropertyModel into a BindingModel class and we give it the path extracted from bindgen binding. > This approach is too heavy for a Wicket > "core" feature, but I mention it because on the surface it seems like the > cleanest option for JPA-backed Wicket projects. We use QueryDSL too. But I don't think it's a good idea to use it for this sort of thing. The fact is that we use @Bindable on a lot of classes/interfaces, not only our entities. > Is there a clear "best" here (or elsewhere)? Worst? :) > Igor, is it accurate to say that metagen supercedes bindgen-wicket? > Is it a reasonable goal for this to be a core feature, or does its probable > Maven plugin relegate it to another (experimental?) module? I took a look at metagen. I prefer the fluid syntax of bindgen: it's really nice and very efficient to use (autocompletion on the property path is quite handy). That said, bindgen is quite complicated and IIRC doesn't support Java 7 at the moment (according to posts on bindgen mailing list). It's really comfortable to have a typesafe, checked at compile time API to deal with properties and it really changed the way we use Wicket. -- Guillaume
