use of org.activityinfo.ui.client.component.importDialog.model.MapExistingAction in project activityinfo by bedatadriven.
the class GridHeaderCell method render.
@Override
public void render(Context context, SourceColumn column, SafeHtmlBuilder sb) {
if (context.getIndex() == ColumnMappingGrid.SOURCE_COLUMN_HEADER_ROW) {
sb.append(SafeHtmlUtils.fromTrustedString("<span title='" + column.getHeader() + "'>"));
sb.appendEscaped(column.getHeader());
sb.append(SafeHtmlUtils.fromTrustedString("</span>"));
} else {
ColumnAction action = model.getColumnAction(column);
if (action == null) {
sb.appendHtmlConstant(I18N.CONSTANTS.chooseFieldHeading());
} else if (action == IgnoreAction.INSTANCE) {
sb.appendEscaped(I18N.CONSTANTS.ignoreColumnAction());
} else if (action instanceof MapExistingAction) {
String label = ((MapExistingAction) action).getTarget().getLabel();
sb.append(SafeHtmlUtils.fromTrustedString("<span title='" + label + "'>"));
sb.appendEscaped(label);
sb.append(SafeHtmlUtils.fromTrustedString("</span>"));
}
}
}
Aggregations