this.mappedType = mappedType;
}
@Override
public void performAction() {
DataField df = ((DataField)this._component);
df.setOriginalFormatText(this.template.toString());
if (this.mappedType == null){
if (df.getDocument() instanceof TypeAwareValueModel){
TypeAwareValueModel vm = (TypeAwareValueModel)df.getDocument();
this.mappedType = vm.getValueType();
} else {
this.mappedType = DateTimeData.class;
}
}
String templateValue = template.toString();
String inputMask = this.formatter.convertFormatMask(templateValue);
String format = this.formatter.convertTemplate(templateValue);
// TF:14/07/2009:Fixed this to handle other placeholder characters besides '*'
Matcher m = placeholderPattern.matcher(templateValue);
char placeHolderChar = '*';
if (m.find()) {
String value = m.group(1);
placeHolderChar = value.charAt(0);
}
DataFieldFactory.configureFormatter(df, inputMask, placeHolderChar, format, mappedType);
SimpleDateFormat sdf = new SimpleDateFormat(format);
sdf.setLenient(this.formatter.isLenient());
((DataFieldVerifier)df.getInputVerifier()).setDateFormat(sdf);
}