コード例 #1
0
 public void deleteRoute(final Long id) {
   RouteRequest routeRequest = boulderLogRequestFactory.routeRequest();
   routeRequest
       .deleteById(id)
       .fire(
           new Receiver<Void>() {
             @Override
             public void onSuccess(Void response) {
               routeListView.removeRouteWidgetById(id);
             }
           });
 }
コード例 #2
0
 public void addRoute(String text) {
   RouteRequest routeRequest = boulderLogRequestFactory.routeRequest();
   RouteProxy newRoute = routeRequest.create(RouteProxy.class);
   newRoute.setName(text);
   routeRequest
       .saveAndReturn(newRoute)
       .fire(
           new Receiver<RouteProxy>() {
             @Override
             public void onSuccess(RouteProxy response) {
               routeListView.createRouteWidget(response);
               routeListView.resetTextBox();
             }
           });
 }
コード例 #3
0
  /** Invoked by the ActivityManager to start a new Activity */
  public void start(AcceptsOneWidget containerWidget, EventBus eventBus) {
    routeListView.setPresenter(this);
    routeListView.clearRouteList();
    RouteRequest routeRequest = boulderLogRequestFactory.routeRequest();
    routeRequest
        .listAll()
        .fire(
            new Receiver<List<RouteProxy>>() {
              @Override
              public void onSuccess(List<RouteProxy> response) {
                for (final RouteProxy r : response) {
                  routeListView.createRouteWidget(r);
                }
              }
            });

    containerWidget.setWidget(routeListView.asWidget());
  }