IDEMPIERE-2783:IllegalArgumentException when export csv a tab has time field

This commit is contained in:
hieplq 2015-08-23 21:48:39 +08:00
parent 229b1c468f
commit ef2ce4d9f5
2 changed files with 3 additions and 3 deletions

View File

@ -114,7 +114,7 @@ public class GridTabCSVExporter implements IGridTabExporter
} else if (DisplayType.DateTime == field.getDisplayType()) {
procArray.add(new Optional(new FmtDate(DisplayType.DEFAULT_TIMESTAMP_FORMAT)));
} else if (DisplayType.Time == field.getDisplayType()) {
procArray.add(new Optional(new FmtDate("DisplayType.DEFAULT_TIME_FORMAT")));
procArray.add(new Optional(new FmtDate(DisplayType.DEFAULT_TIME_FORMAT)));
} else if (DisplayType.Integer == field.getDisplayType() || DisplayType.isNumeric(field.getDisplayType())) {
DecimalFormat nf = DisplayType.getNumberFormat(field.getDisplayType());
nf.setGroupingUsed(false);
@ -178,7 +178,7 @@ public class GridTabCSVExporter implements IGridTabExporter
} else if (DisplayType.DateTime == field.getDisplayType()) {
procArray.add(new Optional(new FmtDate(DisplayType.DEFAULT_TIMESTAMP_FORMAT)));
} else if (DisplayType.Time == field.getDisplayType()) {
procArray.add(new Optional(new FmtDate("DisplayType.DEFAULT_TIME_FORMAT")));
procArray.add(new Optional(new FmtDate(DisplayType.DEFAULT_TIME_FORMAT)));
} else if (DisplayType.Integer == field.getDisplayType() || DisplayType.isNumeric(field.getDisplayType())) {
DecimalFormat nf = DisplayType.getNumberFormat(field.getDisplayType());
nf.setGroupingUsed(false);

View File

@ -1134,7 +1134,7 @@ public class GridTabCSVImporter implements IGridTabImporter
} else if (DisplayType.DateTime == field.getDisplayType()) {
return (new Optional(new ParseDate(DisplayType.DEFAULT_TIMESTAMP_FORMAT)));
} else if (DisplayType.Time == field.getDisplayType()) {
return (new Optional(new ParseDate("DisplayType.DEFAULT_TIME_FORMAT")));
return (new Optional(new ParseDate(DisplayType.DEFAULT_TIME_FORMAT)));
} else if (DisplayType.Integer == field.getDisplayType()) {
return (new Optional(new ParseInt()));
} else if (DisplayType.isNumeric(field.getDisplayType())) {