@Override public void render(Context context, InputItem rec, SafeHtmlBuilder sb) { boolean changed = changedRecs.containsKey(rec.getId()); String style = changed ? "color: red; font-weight: bold;" : "color: black; font-weight: normal"; sb.appendHtmlConstant("<span style=\"" + style + "\">"); sb.append(SafeHtmlUtils.fromString("" + rec.getId())); sb.appendHtmlConstant("</span>"); }
private void markChange(InputItem rec) { if (!changedRecs.containsKey(rec.getId())) { changedRecs.put(rec.getId(), rec); if (!separator.isVisible()) { md.info( MDS, "Some data has been changed. Click 'Save' or 'Cancel' when editing is finished."); editMode(true); } dataGrid.redraw(); } }