Package com.smartgwt.client.util

Examples of com.smartgwt.client.util.BooleanCallback


      final String icon = treeNode.getIcon();

      String userId = panel.ensureUserLoggedIn();
      if (userId == null) {
        // Log out, then show sample:
        Authentication.getInstance().logout(new BooleanCallback() {

          public void execute(Boolean value) {
            if (value) {
              showSample(panel, name, icon);
            }
          }
        });
      } else if (userId.equals(Authentication.getInstance().getUserId())) {
        showSample(panel, treeNode.getName(), treeNode.getIcon());
      } else {
        // Switch user, then show sample:
        Authentication.getInstance().login(userId, userId, new BooleanCallback() {

          public void execute(Boolean value) {
            if (value) {
              showSample(panel, name, icon);
            }
View Full Code Here


    // Create horizontal layout for login buttons:
    HLayout buttonLayout = new HLayout();
    buttonLayout.setMembersMargin(10);

    // Create login handler that re-initializes the map on a successful login:
    final BooleanCallback initMapCallback = new BooleanCallback() {

      public void execute(Boolean value) {
        if (value) {
          map.destroy();
          map = new MapWidget("mapVectorSecurity", "gwt-samples");
View Full Code Here

    // Create horizontal layout for login buttons:
    HLayout buttonLayout = new HLayout();
    buttonLayout.setMembersMargin(10);

    // Create login handler that re-initializes the map on a successful login:
    final BooleanCallback initMapCallback = new BooleanCallback() {

      public void execute(Boolean value) {
        if (value) {
          toolbar.destroy();
          map.destroy();
View Full Code Here

    map.setVisible(false);
    layout.addMember(map);
    map.init();

    // Create login handler that re-initializes the map on a successful login:
    final BooleanCallback initMapCallback = new BooleanCallback() {

      public void execute(Boolean value) {
        if (value) {
          map.destroy();
          map = new MapWidget("mapBeans", "gwt-samples");
View Full Code Here

    // Create horizontal layout for login buttons:
    HLayout buttonLayout = new HLayout();
    buttonLayout.setMembersMargin(10);

    // Create login handler that re-initializes the map on a successful login:
    final BooleanCallback initMapCallback = new BooleanCallback() {

      public void execute(Boolean value) {
        if (value) {
          map.destroy();
          map = new MapWidget("mapVectorSecurity", "gwt-samples");
View Full Code Here

      deleteButton.setAutoFit(true);
      deleteButton.setShowDisabledIcon(false);
      deleteButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
          SC.ask(messages.searchFavouritesListWidgetDelete(),
              messages.searchFavouritesListWidgetDeleteMessage(), new BooleanCallback() {
                public void execute(Boolean value) {
                  if (value) {
                    favouriteItems.collapseRecord(record);
                    SearchWidgetRegistry.getFavouritesController().onDeleteRequested(
                        new FavouriteEvent(flr.getFavourite(), null,
View Full Code Here

   */
  public void onClick(MenuItemClickEvent event) {
    if (feature != null && feature.isSelected()) {
      SC.confirm(
          I18nProvider.getGlobal().confirmDeleteFeature(feature.getLabel(), feature.getLayer().getLabel()),
          new BooleanCallback() {

            public void execute(Boolean value) {
              if (value) {
                feature.getLayer().deselectFeature(feature);
                mapWidget.getMapModel().getFeatureEditor()
View Full Code Here

                        disableAllFooterControls();
                        if (tableAction.getConfirmMessage() != null) {
                            String message = tableAction.getConfirmMessage().replaceAll("\\#",
                                String.valueOf(listGrid.getSelectedRecords().length));

                            SC.ask(message, new BooleanCallback() {
                                public void execute(Boolean confirmed) {
                                    if (null == confirmed) {
                                        refreshTableInfo();
                                    } else if (confirmed) {
                                        refreshTableInfo();
View Full Code Here

                public void executeAction(final ListGridRecord[] selection, Object actionValue) {
                    if (containsStorageNodeOrItsResource(selection)) {
                        // ask again if we are going to remove platform, storage node or its child
                        SC.confirm(MSG.view_inventory_resources_uninventoryStorageConfirm(),
                            new BooleanCallback() {
                            public void execute(Boolean test) {
                                if (test) uninventoryItems(selection);
                            }
                        });
                    } else {
View Full Code Here

            final EnhancedIButton okButton = new EnhancedIButton(MSG.common_button_ok(), ButtonColor.BLUE);
            okButton.setDisabled(true);
            okButton.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() {
                public void onClick(ClickEvent clickEvent) {
                    SC.confirm(MSG.view_configEdit_confirm_1(), new BooleanCallback() {
                        @Override
                        public void execute(Boolean confirmed) {
                            if (confirmed) {
                                Object value = selectItem.getValue();
                                if (value != null) {
View Full Code Here

TOP

Related Classes of com.smartgwt.client.util.BooleanCallback

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.