Examples of CommandCallback


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

    editFeatureButton.setWidth(200);
    editFeatureButton.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        layer = (VectorLayer) map.getMapModel().getLayer("clientLayerBeans");
        GwtCommandDispatcher.getInstance().execute(command, new CommandCallback() {

          public void execute(CommandResponse response) {
            if (response instanceof SearchFeatureResponse) {
              SearchFeatureResponse resp = (SearchFeatureResponse) response;
              for (org.geomajas.layer.feature.Feature dtoFeature : resp.getFeatures()) {
View Full Code Here

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

    // Create the command, with the correct Spring bean name:
    GwtCommand command = new GwtCommand("command.MySuperDoIt");
    command.setCommandRequest(commandRequest);

    // Execute the command, and do something with the response:
    GwtCommandDispatcher.getInstance().execute(command, new CommandCallback() {

      public void execute(CommandResponse response) {
        // Command returned successfully. Do something with the result.
      }
    });
View Full Code Here

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

  }

  public static void getSearchFavourites(final DataCallback<List<SearchFavourite>> onFinished) {
    GwtCommand command = new GwtCommand(GetSearchFavouritesRequest.COMMAND);
    command.setCommandRequest(new GetSearchFavouritesRequest());
    GwtCommandDispatcher.getInstance().execute(command, new CommandCallback() {
      public void execute(CommandResponse response) {
        if (response instanceof GetSearchFavouritesResponse) {
          GetSearchFavouritesResponse resp = (GetSearchFavouritesResponse) response;
          if (onFinished != null) {
            int size = resp.getPrivateSearchFavourites().size() + resp.getSharedSearchFavourites().size();
View Full Code Here

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

  public static void saveSearchFavourite(SearchFavourite sf, final DataCallback<SearchFavourite> onFinished) {
    SaveSearchFavouriteRequest ssfr = new SaveSearchFavouriteRequest();
    ssfr.setSearchFavourite(sf);
    GwtCommand command = new GwtCommand(SaveSearchFavouriteRequest.COMMAND);
    command.setCommandRequest(ssfr);
    GwtCommandDispatcher.getInstance().execute(command, new CommandCallback() {
      public void execute(CommandResponse response) {
        if (response instanceof SaveSearchFavouriteResponse) {
          SaveSearchFavouriteResponse resp = (SaveSearchFavouriteResponse) response;
          if (onFinished != null) {
            onFinished.execute(resp.getSearchFavourite());
View Full Code Here

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

  public static void deleteSearchFavourite(SearchFavourite sf, final DataCallback<Boolean> onFinished) {
    DeleteSearchFavouriteRequest dsfr = new DeleteSearchFavouriteRequest();
    dsfr.setSearchFavouriteId(sf.getId());
    GwtCommand command = new GwtCommand(DeleteSearchFavouriteRequest.COMMAND);
    command.setCommandRequest(dsfr);
    GwtCommandDispatcher.getInstance().execute(command, new CommandCallback() {
      public void execute(CommandResponse response) {
        if (response instanceof SuccessCommandResponse) {
          SuccessCommandResponse resp = (SuccessCommandResponse) response;
          if (onFinished != null) {
            onFinished.execute(resp.isSuccess());
View Full Code Here

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

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

    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[] geoms = new Geometry[2];
View Full Code Here

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

    request.setActionFlags(GeometryUtilsRequest.ACTION_MERGE);
    request.setGeometries(toDtoGeometries(geometries));

    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) {
            onFinished.execute(GeometryConverter.toGwt(resp.getGeometries()[0]));
View Full Code Here

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

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

    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

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

    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
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.