Examples of CommandCallback


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

    } 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

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

   * @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

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

    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

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

      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

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

      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

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

      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

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

      }
    }

    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

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

    request.setLocation(GeometryConverter.toDto(polygon));
    request.setCrs(mapModel.getCrs());
    request.setQueryType(SearchByLocationRequest.QUERY_INTERSECTS);
    request.setSearchType(SearchByLocationRequest.SEARCH_ALL_LAYERS);
    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();
          featureCache.clear();
View Full Code Here

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

    final HTMLFlow copyrightWidget = new HTMLFlow("Copyright info");
    layout.addMember(copyrightWidget);
    GwtCommand commandRequest = new GwtCommand(CopyrightRequest.COMMAND);
    commandRequest.setCommandRequest(new EmptyCommandRequest());
    GwtCommandDispatcher.getInstance().execute(commandRequest, new CommandCallback() {

      public void execute(CommandResponse response) {
        if (response instanceof CopyrightResponse) {
          Collection<CopyrightInfo> copyrights = ((CopyrightResponse) response).getCopyrights();
          StringBuilder sb = new StringBuilder("<h2>");
View Full Code Here

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

        request.setFilter(layer.getFilter());
        request.setFeatureIncludes(GwtCommandDispatcher.getInstance().getLazyFeatureIncludesSelect());

        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;
              List<Feature> features = new ArrayList<Feature>();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.