{
validator.validate(this);
}
// transfer changes to the top preference set
PreferenceSet preferences = (PreferenceSet)preferenceSetList.get(0);
PreferenceSetCtrl preferencesCtrl = (PreferenceSetCtrl)ControllerObjectAccess.get(preferences);
// modified preferences
Iterator iter = changedPreferences.keySet().iterator();
while (iter.hasNext())
{
String key = (String) iter.next();
String[] values = (String[])changedPreferences.get(key);
// null values are allowed
List newValues = null;
if (values != null)
{
// convert values from string[] to collection
newValues = new ArrayList(values.length);
for (int i=0;i<values.length;i++)
newValues.add(values[i]);
}
// transfer changings
Preference preference = preferences.get(key);
if (preference != null)
{
// change preference
PreferenceCtrl preferenceCtrl = (PreferenceCtrl)ControllerObjectAccess.get(preference);
preferenceCtrl.setValues(newValues);