Examples of CommandCallback


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

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

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

            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

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

  }

  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

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

      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

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

    }

    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

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

    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

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

    setFallbackController(new NavigationController());

    Command commandRequest = new Command(GetMapConfigurationRequest.COMMAND);
    commandRequest.setCommandRequest(new GetMapConfigurationRequest(id, applicationId));
    CommandService cmdService = new CommandService();
    cmdService.execute(commandRequest, new CommandCallback() {

      public void onSuccess(CommandResponse response) {
        if (response instanceof GetMapConfigurationResponse) {
          // Initialize the MapModel and ViewPort:
          GetMapConfigurationResponse r = (GetMapConfigurationResponse) response;
View Full Code Here

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

      request.setCrs(crs);
      request.setFeatureIncludes(11);

      Command command = new Command(SearchByLocationRequest.COMMAND);
      command.setCommandRequest(request);
      commandService.execute(command, new CommandCallback() {

        public void onSuccess(CommandResponse response) {
          if (response instanceof SearchByLocationResponse) {
            SearchByLocationResponse sblr = (SearchByLocationResponse) response;
            for (List<org.geomajas.layer.feature.Feature> dtos : sblr.getFeatureMap().values()) {
View Full Code Here

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

    request.setCrs(crs);
    request.setFeatureIncludes(11);

    Command command = new Command(SearchByLocationRequest.COMMAND);
    command.setCommandRequest(request);
    commandService.execute(command, new CommandCallback() {

      public void onSuccess(CommandResponse response) {
        if (response instanceof SearchByLocationResponse) {
          SearchByLocationResponse sblr = (SearchByLocationResponse) response;
          for (Entry<String, List<org.geomajas.layer.feature.Feature>> entry : sblr.getFeatureMap()
View Full Code Here

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

      request.setFilter(fs.getFilter());
      request.setFeatureIncludes(11);

      Command command = new Command(SearchFeatureRequest.COMMAND);
      command.setCommandRequest(request);
      commandService.execute(command, new CommandCallback() {

        public void onSuccess(CommandResponse response) {
          if (response instanceof SearchFeatureResponse) {
            SearchFeatureResponse sfr = (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.