Pages

Thursday, 19 November 2009

Property editors/inspectors

Ooh yeah, another tip, if you have ever have to write your own property editor (or inspector or whatever you want to name it) Java Introspection works just fine. But to write your own property editor based on JavaBeans and BeanInfo Classes that’s just a pain in the ass…. Seeing Sun’s BeanBox I had an ‘aha phenomenon’ because I had just seen something that fulfilled all my needs. So I search for the code that could just render me a property editor just like the BeanBox does. But I can now say to you ‘bad approach’. So if you ever plan to write your own property editor based on Java Introspection, just write some simple classes who render a basic property editor without using custom property editors based on java.beans.PropertyEditorSupport, and other shit….

Indeed it is ‘Quick & Dirty’ but the other way seems just to be too much work compared to the benefits it gives you…