Package org.geomajas.gwt.client.command

Examples of org.geomajas.gwt.client.command.CommandCallback


    request.setGeometries(toDtoGeometries(geometries));
    request.setBuffer(buffer);

    GwtCommand command = new GwtCommand(GeometryUtilsRequest.COMMAND);
    command.setCommandRequest(request);
    GwtCommandDispatcher.getInstance().execute(command, new CommandCallback() {
      public void execute(CommandResponse response) {
        if (response instanceof GeometryUtilsResponse) {
          GeometryUtilsResponse resp = (GeometryUtilsResponse) response;
          if (onFinished != null) {
            Geometry[] geometriesArray = new Geometry[resp.getGeometries().length];
View Full Code Here


    request.setLayerFilters(getLayerFiltersForCriterion(criterion, mapWidget.getMapModel()));
    request.setFeatureIncludes(GwtCommandDispatcher.getInstance().getLazyFeatureIncludesSelect());

    GwtCommand commandRequest = new GwtCommand(FeatureSearchRequest.COMMAND);
    commandRequest.setCommandRequest(request);
    Deferred def = GwtCommandDispatcher.getInstance().execute(commandRequest, new CommandCallback() {
      public void execute(CommandResponse commandResponse) {
        if (commandResponse instanceof FeatureSearchResponse) {
          FeatureSearchResponse response = (FeatureSearchResponse) commandResponse;
          onFinished.execute(convertFromDto(response.getFeatureMap(),
              mapWidget.getMapModel()));
View Full Code Here

    builder.setRasterDpi((Integer) rasterDpiSlider.getValue());
    PrintTemplateInfo template = builder.buildTemplate();
    request.setTemplate(template);
    final GwtCommand command = new GwtCommand(PrintGetTemplateRequest.COMMAND);
    command.setCommandRequest(request);
    GwtCommandDispatcher.getInstance().execute(command, new CommandCallback() {

      public void execute(CommandResponse r) {
        stopProgress();
        if (r instanceof PrintGetTemplateResponse) {
          PrintGetTemplateResponse response = (PrintGetTemplateResponse) r;
View Full Code Here

    } else if (this.userId.equals(userId)) {
      // Already logged in...
      return;
    } else {
      GwtCommand command = new GwtCommand(logoutCommandName);
      GwtCommandDispatcher.getInstance().execute(command, new CommandCallback() {

        public void execute(CommandResponse response) {
          if (response instanceof SuccessCommandResponse) {
            SuccessCommandResponse successResponse = (SuccessCommandResponse) response;
            if (successResponse.isSuccess()) {
View Full Code Here

   * @param callback
   *            A possible callback to be executed when the logout has been done (successfully or not). Can be null.
   */
  public void logout(final BooleanCallback callback) {
    GwtCommand command = new GwtCommand(logoutCommandName);
    GwtCommandDispatcher.getInstance().execute(command, new CommandCallback() {

      public void execute(CommandResponse response) {
        if (response instanceof SuccessCommandResponse) {
          SuccessCommandResponse successResponse = (SuccessCommandResponse) response;
          if (successResponse.isSuccess()) {
View Full Code Here

    LoginRequest request = new LoginRequest();
    request.setLogin(userId);
    request.setPassword(password);
    GwtCommand command = new GwtCommand(loginCommandName);
    command.setCommandRequest(request);
    GwtCommandDispatcher.getInstance().execute(command, new CommandCallback() {

      public void execute(CommandResponse response) {
        if (response instanceof LoginResponse) {
          LoginResponse loginResponse = (LoginResponse) response;
          if (loginResponse.getToken() == null) {
View Full Code Here

      if (!"default".equals(locale)) {
        request.setLocale(locale);
      }
    }
    command.setCommandRequest(request);
    GwtCommandDispatcher.getInstance().execute(command, new CommandCallback() {

      public void execute(CommandResponse commandResponse) {
        goToLocation(commandResponse, location);
      }
    });
View Full Code Here

      case EMPTY:
        fetch(filter, callback);
        break;
      case LOADING:
        final VectorTile self = this;
        deferred.addCallback(new CommandCallback() {

          public void execute(CommandResponse response) {
            if (response instanceof GetVectorTileResponse) {
              callback.execute(self);
            }
View Full Code Here

      request.setFilter(first.getLayer().getFilter());
      request.setFeatureIncludes(featureIncludes);

      GwtCommand command = new GwtCommand(SearchFeatureRequest.COMMAND);
      command.setCommandRequest(request);
      GwtCommandDispatcher.getInstance().execute(command, new CommandCallback() {

        public void execute(CommandResponse response) {
          if (response instanceof SearchFeatureResponse) {
            SearchFeatureResponse resp = (SearchFeatureResponse) response;
            if (null != resp.getFeatures() && resp.getFeatures().length > 0) {
View Full Code Here

      }
    }

    GwtCommand commandRequest = new GwtCommand(SearchByLocationRequest.COMMAND);
    commandRequest.setCommandRequest(request);
    GwtCommandDispatcher.getInstance().execute(commandRequest, new CommandCallback() {

      public void execute(CommandResponse commandResponse) {
        if (commandResponse instanceof SearchByLocationResponse) {
          SearchByLocationResponse response = (SearchByLocationResponse) commandResponse;
          Map<String, List<org.geomajas.layer.feature.Feature>> featureMap = response.getFeatureMap();
View Full Code Here

TOP

Related Classes of org.geomajas.gwt.client.command.CommandCallback

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.