code: protected void detectDirtyFields(Widget parent) {
          if (parent instanceof HasWidgets) {
              for (Widget widget : (HasWidgets) parent) {
                  if (widget instanceof HasValue) {
                      HasValue valueWidget = (HasValue) widget;
                      registrations.add(valueWidget.addValueChangeHandler(event -> {
                          if (valueWidget.getValue() != null && ! valueWidget.getValue().equals("")) {
                              setDirty(true);
                          }
                      }));
                  } else {
                      if (propagateToChildren) {
                          detectDirtyFields(widget);
                      }
                  }
              }
          }
      }
docs: Will check all components that extends to {@link HasValue} and
  registers a {@link com.google.gwt.event.logical.shared.ValueChangeEvent}.
  Once value has been changed then we mark that our content wrapping it is dirty.