Ejemplo n.º 1
0
  public void onChange(Widget sender) {
    if (sender == lstRoutineSelector) {
      if (lstRoutineSelector.getSelectedIndex() > 0) {
        long routineID =
            ((UserRoutine) userRoutineData.getDataObject(lstRoutineSelector.getSelectedIndex() - 1))
                .getUserRoutineID();

        if (routineID != currentRoutineID) {
          currentRoutineID = routineID;
          routineService
              .getService()
              .getRoutineSessions(
                  User.instance().getToken(),
                  routineID,
                  new CallbackScreener(callbackGetRoutineSessions()));
          if (!routineSessionEditor.isVisible()) {
            routineSessionEditor.setVisible(true);
          }
        }
      }
    }
  }