public static class CustomInputWidgetFactory extends DefaultTypedWidgetFactory {
public Widget createWidget(DataType type) {
Class repClass = type.getRepresentationClass();
if (repClass == File.class)
return new FileInputWidget();
if (repClass.isAssignableFrom(TransferableFile.class))
return new TransferableFileWidget(
new FileInputWidget());
else
return super.createWidget(type);
}