I have added the org.formproc.store.Storer interface and a single
implementation, the org.formproc.store.ReflectionStorer to the FormProc
CVS. The idea here is that the system for writing field values to your
object can be defined at runtime by specifying an alternate Storer
implementation for a particular FormElement:
<element name="firstName">
<storer classname="com.mycompany.MyStorer"/>
</element>
If no storer is specified then the default storer is used. Currently
the default storer is always the ReflectionStorer - I can imagine that
the default storer should be configurable. Do you agree?
I haven't tested out an alternate storer yet, but one possible use would
be to store all of the field data in a HashMap.
In addition I have modified the Form class so that some of the methods
which used to be private are now protected (in case you want to overload
some of the functionality).
Sincerely,
Anthony Eden
|