Package org.geomajas.gwt.client.command

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


    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

        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

   */
  @Api
  public void init() {
    GwtCommand commandRequest = new GwtCommand(GetMapConfigurationRequest.COMMAND);
    commandRequest.setCommandRequest(new GetMapConfigurationRequest(id, applicationId));
    GwtCommandDispatcher.getInstance().execute(commandRequest, new CommandCallback() {

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

            if (value != null) {
              RefreshConfigurationRequest request = new RefreshConfigurationRequest();
              request.setConfigLocations(value.trim().split("[ \\r\\t\\n,;]+"));
              GwtCommand command = new GwtCommand(RefreshConfigurationRequest.COMMAND);
              command.setCommandRequest(request);
              GwtCommandDispatcher.getInstance().execute(command, new CommandCallback() {

                public void execute(CommandResponse response) {
                  RefreshConfigurationResponse r = (RefreshConfigurationResponse) response;
                  String message = "Reloaded applications : ";
                  List<String> names = Arrays.asList(r.getApplicationNames());
View Full Code Here

  }

  public void getAttributes(final CallBack callBack) {
    GwtCommand command = new GwtCommand(SearchAttributesRequest.COMMAND);
    command.setCommandRequest(new SearchAttributesRequest(serverLayerId, attributePath));
    GwtCommandDispatcher.getInstance().execute(command, new CommandCallback() {

      public void execute(CommandResponse response) {
        if (response.isError()) {
          callBack.onError(response.getErrorMessages());
        } else if (response instanceof SearchAttributesResponse) {
View Full Code Here

      request.setCrs(mapModel.getCrs());

      GwtCommand command = new GwtCommand(PersistTransactionRequest.COMMAND);
      command.setCommandRequest(request);

      GwtCommandDispatcher.getInstance().execute(command, new CommandCallback() {

        public void execute(CommandResponse response) {
          if (response instanceof PersistTransactionResponse) {
            PersistTransactionResponse ptr = (PersistTransactionResponse) response;
            mapModel.applyFeatureTransaction(new FeatureTransaction(ft.getLayer(), ptr
View Full Code Here

    }

    GetResourcesRequest request = new GetResourcesRequest(resourceFiles);
    GwtCommand command = new GwtCommand("example.gwt.server.samples.GetSourceCommand");
    command.setCommandRequest(request);
    GwtCommandDispatcher.getInstance().execute(command, new CommandCallback() {

      public void execute(CommandResponse response) {
        if (response instanceof GetResourcesResponse) {
          GetResourcesResponse sourceResponse = (GetResourcesResponse) response;
          if (sourceResponse.getResources() == null) {
View Full Code Here

    button.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        GwtCommand command = new GwtCommand("example.gwt.server.samples.GetExceptionCommand");
        command.setCommandRequest(new EmptyCommandRequest());
        GwtCommandDispatcher.getInstance().execute(command, new CommandCallback() {

          public void execute(CommandResponse response) {
            // Do nothing... an error message is shown automatically...
          }
        });
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.