PatternMatcher matcher = new Perl5Matcher();
if (matcher.matches(enteredValue, aggregateDefinition.getSplitPattern())) {
MatchResult matchResult = matcher.getMatch();
Iterator iterator = aggregateDefinition.getSplitMappingsIterator();
while (iterator.hasNext()) {
SplitMapping splitMapping = (SplitMapping)iterator.next();
String result = matchResult.group(splitMapping.getGroup());
// Since we know the fields are guaranteed to have a string datatype, we
// can set the value immediately, instead of going to the readFromRequest
// (which would also require us to create wrapper FormContext and Request
// objects)
((Field)fieldsById.get(splitMapping.getFieldId())).setValue(result);
}
} else {
// set values of the fields to null
Iterator fieldsIt = fields.iterator();
while (fieldsIt.hasNext()) {