private void moveBackToParent() {
    service.moveBackToParent(
        new AsyncCallback<Void>() {
          @Override
          public void onFailure(Throwable caught) {}

          @Override
          public void onSuccess(Void result) {
            updateNavItem();
          }
        });
  }
  private void selectNavItem(String item) {
    service.selectNavItem(
        item,
        new AsyncCallback<List<String>>() {
          @Override
          public void onFailure(Throwable caught) {}

          @Override
          public void onSuccess(List<String> result) {
            updateNavItem();
          }
        });
  }
  public void setDevice(DeviceDesc desc) {
    this.device = desc;
    service.getMediaSources(
        new AsyncCallback<Set<String>>() {
          public void onFailure(Throwable caught) {
            // Show the RPC error message to the user
            System.out.println("FAILURE!!!");
          }

          public void onSuccess(Set<String> result) {
            System.out.println("RESPONSE=" + result);
            Iterator<String> it = result.iterator();
            while (it.hasNext()) {
              source.addItem(it.next());
            }
            DomEvent.fireNativeEvent(Document.get().createChangeEvent(), source);
          }
        });
  }
  private void updateNavItem() {
    service.getNavItems(
        null,
        new AsyncCallback<List<String>>() {
          @Override
          public void onFailure(Throwable caught) {
            System.out.println("Could not retrieve nav items");
          }

          @Override
          public void onSuccess(List<String> result) {
            System.out.println("Received nav " + result.size() + " items");
            Iterator<String> it = result.iterator();
            navigation.clear();
            while (it.hasNext()) {
              navigation.addItem(it.next());
            }
          }
        });
  }