(also see note for 1.1.4pr1 above) When upgrading from any previous release please note that: To have better control of the fields written to the database, we changed the interceptor interface of the preUpdate, preInsert, and preDelete events to:
public int preXXXXXX(HttpServletRequest request, Table table, FieldValues fieldValues, DbFormsConfig config, Connection con) throws ValidationException
Now you have better control over the fields written to the
database. You can remove, change, and add fields. Note however, that
changes to fields marked with
isKey="true" in the
dbforms-config.xml file, are still
disregarded by the preDelete and preUpdate methods.
In many cases, you only need to change the interfaces in your old interceptor code because the interface of the new FieldValues class is nearly the same as the previously used Hashtable.
However, to retrieve values from
will need to change your interceptors in one of two
ways. For example to retrieve a String
String kanji = (String) fieldValues.get("kanji");
you now need to use one of the two following approaches.
String kanji = (String)fieldValues.get("kanji").getFieldValueAsObject();
This will parse the string and build an object of the required type. If the input field is of type String, it returns a String.
String kanji = fieldValues.get("kanji").getFieldValue();
This returns the String as it is written to the form. No further parsing is done as it returns a String.
Please also note that fields can now be
which was not previously possible.
If you are upgrading from 1.1.4pr1, please adjust the following for the
<filterCondition> tag (used embedded within the new
You must change your filter values for strings to not use the apostrophe. This is now done automatically.
name like '?'
must be changed to
name like ?