many years ago i wrote the most minimal and barebones java bean CRUD form to do generic data entry in some distributed agent use cases.
I have more or less brushed this off and given it an autoboxing nudge.
in the particular instance used for demonstration, XStream *can* be in the
class path for our test pojo "Subject", as shown in the debugger below.
XStream is used opportunistically via reflection when found in the classpath, but is not an interruption otherwise.

The editor is pretty simple, it does its best effort to edit to and from strings.
For this test case we use the swing JOptionPane to provide us with a dialog box using 1 line of code around the JPanel.
the next slide shows a little bit of extra credit, putting the original values in the tooltips.
next, the final result, hitting "Yes". The Pojo "Subject class" has managed to do round trip editing of a primitive "int" as well as a string.

No comments:
Post a Comment