Package org.geomajas.gwt.client.command

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


  public void createImageUrl(MapWidget map, ImageUrlCallback imageCallBack, boolean makeRasterizable) {
    if (makeRasterizable) {
      makeRasterizable(map);
    }
    GwtCommand commandRequest = new GwtCommand(RasterizeMapRequest.COMMAND);
    RasterizeMapRequest request = new RasterizeMapRequest();
    request.setClientMapInfo(map.getMapModel().getMapInfo());
    commandRequest.setCommandRequest(request);
    final ImageUrlCallback callBack = imageCallBack;
    GwtCommandDispatcher.getInstance().execute(commandRequest, new CommandCallback() {

      public void execute(CommandResponse commandResponse) {
        if (commandResponse instanceof RasterizeMapResponse) {
View Full Code Here


    addMember(tabs);

    GetClientUserDataRequest request = new GetClientUserDataRequest();
    request.setIdentifier(beanId);
    request.setClassName(RibbonInfo.class.getName());
    GwtCommand command = new GwtCommand(GetClientUserDataRequest.COMMAND);
    command.setCommandRequest(request);
    GwtCommandDispatcher.getInstance().execute(command, new CommandCallback<GetClientUserDataResponse>() {

      public void execute(GetClientUserDataResponse response) {
        RibbonInfo info = (RibbonInfo) response.getInformation();
        for (RibbonBarInfo tabInfo : info.getTabs()) {
View Full Code Here

    this();

    GetClientUserDataRequest request = new GetClientUserDataRequest();
    request.setIdentifier(beanId);
    request.setClassName(RibbonBarInfo.class.getName());
    GwtCommand command = new GwtCommand(GetClientUserDataRequest.COMMAND);
    command.setCommandRequest(request);
    GwtCommandDispatcher.getInstance().execute(command, new CommandCallback<GetClientUserDataResponse>() {

      public void execute(GetClientUserDataResponse response) {
        if (response.getInformation() instanceof RibbonBarInfo) {
          buildGui((RibbonBarInfo) response.getInformation(), mapWidget);
View Full Code Here

      exportRequest.setLocale(messages.exportToCsvLocale());
      exportRequest.setSeparatorChar(messages.exportToCsvSeparatorChar());
      exportRequest.setQuoteChar(messages.exportToCsvQuoteChar());
      exportRequest.setLayerId(layer.getServerLayerId());

      GwtCommand command = new GwtCommand(ExportToCsvRequest.COMMAND);
      command.setCommandRequest(exportRequest);
      Deferred deferred = GwtCommandDispatcher.getInstance().execute(command, new CommandCallback() {
        private static final String CONTENT_PRE = "<div style='margin-top: 20px; width: 200px; text-align: "
            + "center'><b>";
        private static final String CONTENT_POST = "</b><br />";
        private static final String LINK_POST = "</div>";
View Full Code Here

        grid.setLayer(layer);
        SearchFeatureRequest searchFeatureRequest = new SearchFeatureRequest();
        searchFeatureRequest.setCrs(map.getMapModel().getCrs());
        searchFeatureRequest.setFeatureIncludes(GeomajasConstant.FEATURE_INCLUDE_ATTRIBUTES);
        searchFeatureRequest.setLayerId("layerBeansEditableGrid");
        GwtCommand searchCommand = new GwtCommand(SearchFeatureRequest.COMMAND);
        searchCommand.setCommandRequest(searchFeatureRequest);

        GwtCommandDispatcher.getInstance().execute(searchCommand,
            new AbstractCommandCallback<SearchFeatureResponse>() {

              public void execute(SearchFeatureResponse response) {
View Full Code Here

    IButton getMapButton = new IButton("command.GetMap");
    getMapButton.setWidth(150);
    getMapButton.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        GwtCommand commandRequest = new GwtCommand(GetMapConfigurationRequest.COMMAND);
        commandRequest.setCommandRequest(new GetMapConfigurationRequest("mapOsm", "gwt-samples"));
        GwtCommandDispatcher.getInstance().execute(commandRequest, new CommandCallback() {

          public void execute(CommandResponse response) {
            SC.say("Command executed successfully");
          }
        });
      }
    });
    commandLayout.addMember(getMapButton);

    // Create a button that calls the GetMapConfigurationCommand:
    IButton getResourcesButton = new IButton("command.GetResources");
    getResourcesButton.setWidth(150);
    getResourcesButton.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        GetResourcesRequest request = new GetResourcesRequest(
            new String[] { "WEB-INF/security.xml" });
        GwtCommand command = new GwtCommand("example.gwt.server.samples.GetSourceCommand");
        command.setCommandRequest(request);
        GwtCommandDispatcher.getInstance().execute(command, new CommandCallback() {

          public void execute(CommandResponse response) {
            // User mark should never get here...
            SC.say("Command executed successfully");
View Full Code Here

        grid.setLayer(layer);
        SearchFeatureRequest searchFeatureRequest = new SearchFeatureRequest();
        searchFeatureRequest.setCrs(map.getMapModel().getCrs());
        searchFeatureRequest.setFeatureIncludes(GeomajasConstant.FEATURE_INCLUDE_ATTRIBUTES);
        searchFeatureRequest.setLayerId("layerCountries110m");
        GwtCommand searchCommand = new GwtCommand(SearchFeatureRequest.COMMAND);
        searchCommand.setCommandRequest(searchFeatureRequest);

        GwtCommandDispatcher.getInstance().execute(searchCommand,
            new AbstractCommandCallback<SearchFeatureResponse>() {

              public void execute(SearchFeatureResponse response) {
View Full Code Here

    request.setBooleanOperator("AND");
    request.setCrs("EPSG:900913"); // Can normally be acquired from the MapModel.
    request.setLayerId("layerBeans");
    request.setMax(1);
    request.setCriteria(new SearchCriterion[] { new SearchCriterion("id", "=", "1") });
    final GwtCommand command = new GwtCommand(SearchFeatureRequest.COMMAND);
    command.setCommandRequest(request);

    // Create a button that executes the search command:
    IButton editFeatureButton = new IButton(I18nProvider.getSampleMessages().attributeSecurityButtonTitle());
    editFeatureButton.setWidth(200);
    editFeatureButton.addClickHandler(new ClickHandler() {
View Full Code Here

    // @extract-start GwtCommandExecution, Example use of executing a command.
    MySuperDoItRequest commandRequest = new MySuperDoItRequest();
    // .... add parameters to the request.

    // 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) {
View Full Code Here

   */
  private FavouritesCommService() {
  }

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