Ejemplo n.º 1
0
  /**
   * Sets new value of row if the {@link UserItem} is already shown.
   *
   * @param value new value to show
   */
  public void setValue(final UserItem value) {
    if (!hasAllLabels(value.getLabels())) {
      Managers.LABELS_MANAGER.refresh(
          new AsyncCallback<Void>() {
            public void onSuccess(Void result) {
              doSetValue(value);
            }

            public void onFailure(Throwable caught) {}
          });
    } else {
      doSetValue(value);
    }
  }
Ejemplo n.º 2
0
  /** Makes all pending {@link UserItem}s below the last one show. */
  public void showTail() {
    Set<Key> labels = new HashSet<Key>();
    for (UserItem ui : tail) {
      labels.addAll(ui.getLabels());
    }
    if (!hasAllLabels(labels)) {
      Managers.LABELS_MANAGER.refresh(
          new AsyncCallback<Void>() {
            public void onSuccess(Void result) {
              addTail();
            }

            public void onFailure(Throwable caught) {}
          });
    } else {
      addTail();
    }
  }