Exemplo n.º 1
0
  @Override
  protected void onReveal() {
    List<ActionType> actions = Arrays.asList(ActionType.DONE);
    ChangeActionBarEvent.fire(this, actions, false);

    dispatcher.execute(
        carService.getCars(),
        new AbstractAsyncCallback<List<CarDto>>() {
          @Override
          public void onSuccess(List<CarDto> cars) {
            onGetCarsSuccess(cars);
          }
        });
  }
Exemplo n.º 2
0
 @Override
 public void onSave(RatingDto ratingDto) {
   dispatcher.execute(
       ratingService.saveOrCreate(ratingDto),
       new ErrorHandlerAsyncCallback<RatingDto>(this) {
         @Override
         public void onSuccess(RatingDto savedRating) {
           DisplayMessageEvent.fire(
               RatingDetailPresenter.this,
               new Message(messages.ratingSaved(), MessageStyle.SUCCESS));
           placeManager.revealPlace(new Builder().nameToken(NameTokens.getRating()).build());
         }
       });
 }