Package org.geomajas.gwt.client.command

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


          public void execute(String value) {
            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 : ";
View Full Code Here


    request.setBbox(new org.geomajas.geometry.Bbox(tileBounds.getX(), tileBounds.getY(), tileBounds.getWidth(),
        tileBounds.getHeight()));
    request.setCrs(getLayer().getMapModel().getCrs());
    request.setLayerId(getLayer().getServerLayerId());
    request.setScale(getLayer().getMapModel().getMapView().getCurrentScale());
    GwtCommand command = new GwtCommand(GetRasterTilesRequest.COMMAND);
    command.setCommandRequest(request);
    RasterCallBack callBack = new RasterCallBack(worldToPan(bounds), onUpdate);
    deferred = GwtCommandDispatcher.getInstance().execute(command, callBack);
  }
View Full Code Here

    this.serverLayerId = serverLayerId;
    this.attributePath = attributePath;
  }

  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());
View Full Code Here

      PersistTransactionRequest request = new PersistTransactionRequest();
      request.setFeatureTransaction(ft.toDto());
      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) {
View Full Code Here

    for (int i = 0; i < getConfigurationFiles().length; i++) {
      resourceFiles[i + 1] = getConfigurationFiles()[i];
    }

    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;
View Full Code Here

    button.setWidth(300);
    button.setLayoutAlign(Alignment.CENTER);
    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

    builder.setWithArrow((Boolean) arrowCheckbox.getValue());
    builder.setWithScaleBar((Boolean) scaleBarCheckbox.getValue());
    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 AbstractCommandCallback<PrintGetTemplateResponse>() {

      public void execute(PrintGetTemplateResponse response) {
        stopProgress();
        UrlBuilder url = new UrlBuilder(GWT.getHostPageBaseURL());
        url.addPath(URL_PATH);
        url.addParameter(URL_DOCUMENT_ID, response.getDocumentId());
        url.addParameter(URL_NAME, (String) fileNameItem.getValue());
        url.addParameter(URL_TOKEN, command.getUserToken());
        if (SAVE.equals(downloadTypeGroup.getValue())) {
          url.addParameter(URL_DOWNLOAD, URL_DOWNLOAD_YES);
          String encodedUrl = url.toString();
          // create a hidden iframe to avoid popups ???
          HTMLPanel hiddenFrame = new HTMLPanel("<iframe src='" + encodedUrl
View Full Code Here

TOP

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

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.