@Override
protected void onTimer(AjaxRequestTarget target) {
FeatureTypeImporter importer = getImporter();
ImportSummary summary = importer.getSummary();
if(summary != null) {
if(summary.isCompleted()) {
setResponsePage(new ImportSummaryPage(summary));
}
long perc = Math.round(100.0 * (summary.getProcessedLayers() + 1) / summary.getTotalLayers());
if(perc > 100) {
perc = 100;
}
widthModel.setObject("width: " + perc + "%;");
percentage.setModelObject(perc);
currentFile.setModelObject(summary.getCurrentLayer());
target.addComponent(info);
}
}