Package org.drools.guvnor.client.common

Examples of org.drools.guvnor.client.common.GenericCallback


                                                                          newNameTextBox.getText() ) ) {
                                                            serv.copyOrRemoveSnapshot( packageName,
                                                                                       snapshotName,
                                                                                       false,
                                                                                       newNameTextBox.getText(),
                                                                                       new GenericCallback() {
                                                                                           public void onSuccess(Object data) {
                                                                                               copy.hide();
                                                                                               Window.alert( Format.format( constants.CreatedSnapshot0ForPackage1(),
                                                                                                                            newNameTextBox.getText(),
                                                                                                                            packageName ) );
                                                                                           }
                                                                                       } );
                                                        }
                                                    } else {
                                                        for ( RadioButton rb : options ) {
                                                            if ( rb.isChecked() ) {
                                                                final String newName = rb.getText();
                                                                serv.copyOrRemoveSnapshot( packageName,
                                                                                           snapshotName,
                                                                                           false,
                                                                                           newName,
                                                                                           new GenericCallback() {
                                                                                               public void onSuccess(Object data) {
                                                                                                   copy.hide();
                                                                                                   Window.alert( Format.format( constants.Snapshot0ForPackage1WasCopiedFrom2(),
                                                                                                                                newName,
                                                                                                                                packageName,
View Full Code Here


    }

    public static void rebuildBinaries() {
        if ( Window.confirm( constants.SnapshotRebuildWarning() ) ) {
            LoadingPopup.showMessage( constants.RebuildingSnapshotsPleaseWaitThisMayTakeSomeTime() );
            RepositoryServiceFactory.getService().rebuildSnapshots( new GenericCallback() {
                public void onSuccess(Object data) {
                    LoadingPopup.close();
                    Window.alert( constants.SnapshotsWereRebuiltSuccessfully() );
                }
            } );
View Full Code Here

    private void loadInitialTree() {
        navTreeWidget.addItem( constants.PleaseWait() );
        DeferredCommand.addCommand(new Command() {
      public void execute() {
            service.loadChildCategories( "/",
                                         new GenericCallback() {


                                             public void onSuccess(Object result) {
                                                 selectedPath = null;
                                                 navTreeWidget.removeItems();
View Full Code Here

        this.selectedPath = getPath( item );

        //item.setUserObject( new Boolean( true ) );

        service.loadChildCategories( selectedPath,
                                     new GenericCallback() {

                                         public void onSuccess(Object result) {
                                             TreeItem child = root.getChild( 0 );
                                             if ( child instanceof PendingItem ) {
                                                 // root.removeItem( child );
View Full Code Here

        }
    }

    void ok() {

        AsyncCallback cb = new GenericCallback() {
            public void onSuccess(Object result) {
                if (((Boolean) result).booleanValue()) {
                  if (refresh != null) {
                    refresh.execute();
                  }
View Full Code Here

    }

  private void removeStatus() {
    String name = currentStatuses.getItemText(currentStatuses.getSelectedIndex());

    RepositoryServiceFactory.getService().removeState(name, new GenericCallback() {
      public void onSuccess(Object data) {
        Window.alert(constants.StatusRemoved());
        refreshList();
      }
    });
View Full Code Here

              public void onClick(com.gwtext.client.widgets.Button button, EventObject e) {
                      if (grid.getSelectedRowUUIDs() == null) {
                        Window.alert(constants.PleaseSelectAnItemToRestore());
                        return;
                      }
                        RepositoryServiceFactory.getService().archiveAssets( grid.getSelectedRowUUIDs(), false, new GenericCallback() {
                            public void onSuccess(Object arg0) {
                                Window.alert(constants.ItemRestored());
                                grid.refreshGrid();
                            }
                        });
              };
        });


        final ToolbarButton deleteAsset = new ToolbarButton();
        deleteAsset.setText(constants.DeleteSelectedAsset());
        tb.addButton(deleteAsset);

        deleteAsset.addListener(
            new ButtonListenerAdapter() {
              public void onClick(
                  com.gwtext.client.widgets.Button button,
                  EventObject e) {
                      if (grid.getSelectedRowUUIDs() == null) {
                        Window.alert(constants.PleaseSelectAnItemToPermanentlyDelete());
                        return;
                      }
                      if (!Window.confirm(constants.AreYouSureDeletingAsset())) {
                        return;
                      }
                        RepositoryServiceFactory.getService().removeAssets( grid.getSelectedRowUUIDs(), new GenericCallback() {

                            public void onSuccess(Object arg0) {
                                Window.alert(constants.ItemDeleted());
                                grid.refreshGrid();
                            }
View Full Code Here

        initWidget( pf );
    }


  private void deletePackage(final String uuid) {
    RepositoryServiceFactory.getService().removePackage(uuid, new GenericCallback( ) {
      public void onSuccess(Object data) {
        Window.alert(constants.PackageDeleted());
        packages.clear();
        loadPackages();
      }
View Full Code Here

            DeferredCommand.addCommand( new Command() {
                public void execute() {
                    LoadingPopup.showMessage( cs.RefreshingList() );
                    RepositoryServiceFactory.getService().loadDropDownExpression( dropData.valuePairs,
                                                                                  dropData.queryExpression,
                                                                                  new GenericCallback() {
                                                                                      public void onSuccess(Object data) {
                                                                                          LoadingPopup.close();
                                                                                          String[] list = (String[]) data;

                                                                                          if ( list.length == 0 ) {
View Full Code Here

            Button adminClearAll = new Button(constants.EraseAllComments());
            hp.add(adminClearAll);
            adminClearAll.addClickListener(new ClickListener() {
                public void onClick(Widget sender) {
                    if (Window.confirm(constants.EraseAllCommentsWarning())) {
                        RepositoryServiceFactory.getService().clearAllDiscussionsForAsset(asset.uuid, new GenericCallback() {
                            public void onSuccess(Object result) {
                                updateCommentList(new ArrayList<DiscussionRecord>());
                            }
                        });
                    }
View Full Code Here

TOP

Related Classes of org.drools.guvnor.client.common.GenericCallback

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.