Hi,
I just released bindgen 2, a type-safe alternative to OGNL-like string
expressions, that works particularly well in component-based frameworks
like Wicket.
It integrates with javac and/or Eclipse to do things like:
Employee e = new Employee();
Form f = new Form();
f.add(new TextField(e.name());
f.add(new TextField(e.employer().name());
(Pseudo-code.)
The Eclipse integration is such that, as soon as you change Employee
getName() to getName2(), and hit save, the "e.name()" line will no
longer compile, and you'll have to fix the expression to "e.name2()".
Disclaimer: I haven't actually tried it in a Wicket project, but, from
what I know of Wicket, it should work well for binding to objects
without string-based property models or inner classes. My post is
somewhat motivated by a side-comment Gavin King made on his blog [1]
about using annotation processors (as bindgen does) for Wicket's
databinding.
If you'd like to check it out, the website is:
http://joist.ws/bindgen.html
(Technically I built bindgen for use in my own web/orm framework
project, Joist, but bindgen itself is standalone and has no
dependencies on the rest of Joist.)
Any feedback is appreciated.
Thanks,
Stephen
1:
http://blog.hibernate.org/Bloggers/Java6CompilerPluginsAndTypesafeCriteriaQueries#comment10340
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]