...
For example, let’s say that you changed your options in the XML to have one field instead of two. In addition, let’s say this new field contains the concatenation of the original two field values. Here is an example how this might be done:
Code Block |
---|
updateVersion(int savedVersion, ICustomConfiguration config) { if (savedVersion == 1) { String valueOne = config.getString("oldId1"); String valueTwo = config.getString("oldId2"); config.setString(newKey, valueOne + valueTwo); } } |
...
The field id values under the section elements are used as keys to retrieve values from the ICustomXMLConverterConfiguration object that is passed to the conversion methods. This allows for the user-provided values to be passed into your implementation.
For example:
Code Block |
---|
IXMLMessage toXML(INativeMessage nativeMessage, IConversionContext context) throws CustomConversionException { String optionValue = context.getConfiguration().getString("fieldId"); } |
...
The field labels appear in the GUI that is constructed based on this XML. They are also used to persist the user-provided values to the .tst or .pva file when it is saved. The section layout does not have a programmatic impact; it merely helps organize the various GUI fields into sections or categories for easy access and usability by the end user.