Loads the new element info.<p>

@param callback the callback to call when done
545868
public void loadNewElementInfo(final AsyncCallback<Void> callback) {

        CmsRpcAction<List<CmsNewResourceInfo>> newResourceInfoAction = new CmsRpcAction<List<CmsNewResourceInfo>>() {

            @Override
            public void execute() {

                start(200, true);

                getService().getNewElementInfo(m_data.getRoot().getSitePath(), this);
            }

            @Override
            protected void onResponse(List<CmsNewResourceInfo> result) {

                stop(false);

                m_data.setNewElementInfos(result);
                if (callback != null) {
                    callback.onSuccess(null);
                }
            }

        };
        newResourceInfoAction.execute();
    }
462368
@JsIgnore
  public static void onReady(Runnable callback) {
    if (isReady) {
      callback.run();
      return;
    }

    onReadyCallbacks.push(callback);
  }
1353495
public void onModuleLoad() {
        final Button sendButton = new Button( "Send" );
        final TextBox nameField = new TextBox();
        nameField.setText( "GWT User" );
        final Label errorLabel = new Label();

        // We can add style names to widgets
        sendButton.addStyleName( "sendButton" );

        // Add the nameField and sendButton to the RootPanel
        // Use RootPanel.get() to get the entire body element
        RootPanel.get( "nameFieldContainer" ).add( nameField );
        RootPanel.get( "sendButtonContainer" ).add( sendButton );
        RootPanel.get( "errorLabelContainer" ).add( errorLabel );

        // Focus the cursor on the name field when the app loads
        nameField.setFocus( true );
        nameField.selectAll();

        // Create the popup dialog box
        final DialogBox dialogBox = new DialogBox();
        dialogBox.setText( "Remote Procedure Call" );
        dialogBox.setAnimationEnabled( true );
        final Button closeButton = new Button( "Close" );
        // We can set the id of a widget by accessing its Element
        closeButton.getElement().setId( "closeButton" );
        final Label textToServerLabel = new Label();
        final HTML serverResponseLabel = new HTML();
        VerticalPanel dialogVPanel = new VerticalPanel();
        dialogVPanel.addStyleName( "dialogVPanel" );
        dialogVPanel.add( new HTML( "<b>Sending name to the server:</b>" ) );
        dialogVPanel.add( textToServerLabel );
        dialogVPanel.add( new HTML( "<br><b>Server replies:</b>" ) );
        dialogVPanel.add( serverResponseLabel );
        dialogVPanel.setHorizontalAlignment( VerticalPanel.ALIGN_RIGHT );
        dialogVPanel.add( closeButton );
        dialogBox.setWidget( dialogVPanel );

        // Add a handler to close the DialogBox
        closeButton.addClickHandler( new ClickHandler() {
            public void onClick( ClickEvent event ) {
                dialogBox.hide();
                sendButton.setEnabled( true );
                sendButton.setFocus( true );
            }
        } );

        // Create a handler for the sendButton and nameField
        class MyHandler implements ClickHandler, KeyUpHandler {

            /**
             * Fired when the user clicks on the sendButton.
             */
            public void onClick( ClickEvent event ) {
                sendNameToServer();
            }

            /**
             * Fired when the user types in the nameField.
             */
            public void onKeyUp( KeyUpEvent event ) {
                if ( event.getNativeKeyCode() == KeyCodes.KEY_ENTER ) {
                    sendNameToServer();
                }
            }

            /**
             * Send the name from the nameField to the server and wait for a response.
             */
            private void sendNameToServer() {
                // First, we validate the input.
                errorLabel.setText( "" );
                String textToServer = nameField.getText();
                if ( !FieldVerifier.isValidName( textToServer ) ) {
                    errorLabel.setText( "Please enter at least four characters" );
                    return;
                }

                // Then, we send the input to the server.
                sendButton.setEnabled( false );
                textToServerLabel.setText( textToServer );
                serverResponseLabel.setText( "" );

                ginjector.getRestDispatch().execute( ginjector.getHelloRestService()
                        .greet( new GreetingRequest( textToServer ) ), new RestCallback<GreetingResponse>() {

                    private Response response;

                    @Override
                    public void setResponse( Response response ) {
                        this.response = response;
                    }

                    @Override
                    public void onFailure( Throwable caught ) {
                        // Show the RPC error message to the user
                        dialogBox.setText( "Remote Procedure Call - Failure" );
                        serverResponseLabel.addStyleName( "serverResponseLabelError" );
                        if ( null == response ) {
                            serverResponseLabel.setHTML( SERVER_ERROR );
                        } else {
                            serverResponseLabel.setHTML( new SafeHtmlBuilder().appendEscaped( Integer.toString( response.getStatusCode() ) )
                                    .appendEscaped( " : " ).appendEscaped( response.getStatusText() ).toSafeHtml() );
                        }
                        dialogBox.center();
                        closeButton.setFocus( true );
                    }

                    @Override
                    public void onSuccess( GreetingResponse result ) {
                        dialogBox.setText( "Remote Procedure Call" );
                        serverResponseLabel.removeStyleName( "serverResponseLabelError" );
                        serverResponseLabel.setHTML( new SafeHtmlBuilder().appendEscaped( result.getGreeting() )
                                .appendHtmlConstant( "<br><br>I am running " ).appendEscaped( result.getServerInfo() )
                                .appendHtmlConstant( ".<br><br>It looks like you are using:<br>" ).appendEscaped( result.getUserAgent() )
                                .toSafeHtml() );
                        dialogBox.center();
                        closeButton.setFocus( true );
                    }
                } );
            }
        }

        // Add a handler to send the name to the server
        MyHandler handler = new MyHandler();
        sendButton.addClickHandler( handler );
        nameField.addKeyUpHandler( handler );
    }
1073287
public static void show(Map<String, Object> args, IInputCallback callback) {
        Window dialog = (Window) PageUtil
                .createPage(DialogConstants.RESOURCE_PREFIX + "inputDialog.fsp", ExecutionContext.getPage(), args).get(0);

        dialog.modal(callback == null ? null : (event) -> {
            callback.onComplete(dialog.getAttribute("result", String.class));
        }
224431
protected void loadEntry(AsyncCallback<CmsClientSitemapEntry> callback) {

        CmsClientSitemapEntry entry = getEntry();
        if ((entry == null) && (m_sitePath != null)) {
            m_controller.loadPath(m_sitePath, true, callback);
        } else {
            callback.onSuccess(entry);
        }
    }
319408
def add_all_link_done_callback(self, callback):
        """"""
        _LOGGER.debug('Added new callback %s ', callback)
        self._cb_load_all_link_db_done.append(callback)
23682
public void getElements(Set<String> clientIds, I_CmsSimpleCallback<Map<String, CmsContainerElementData>> callback) {

        MultiElementAction action = new MultiElementAction(clientIds, callback);
        action.execute();
    }
739712
function loadImage ($imageElement, newSource, callback) {
        $imageElement.fadeOut(function () {
            $imageElement.attr("src", newSource);
            imgLoad($imageElement, function () {
                $imageElement.removeClass("loading");
                $imageElement.fadeIn();
                if (typeof callback === "function") {
                    callback();
                }
            });
        });
    }
429280
function (callback) {
    var data = JSON.stringify(this);
    this.cloneWithoutData(function(clone) {
      clone.loadFromJSON(data, function() {
        callback && callback(clone);
      });
    });
  }
1211544
def add_loaded_callback(self, callback):
        """"""
        if callback not in self._cb_aldb_loaded:
            self._cb_aldb_loaded.append(callback)
1313735
private void onApiReady(Command callback) {

        if (isApiLoaded()) {
            callback.execute();
        } else {
            onApiReady.add(callback);
            if (!loadingApi) {
                loadingApi = true;
                loadApi();
            }
        }
    }
599237
public static By callback(final Function<SearchContext, List<WebElement>> callback) {
		if (callback == null)
			throw new IllegalArgumentException("Cannot find elements when the callback is null");

		return new ByCallback(callback);
	}
175501
private void addCallback(BeanMessageID type, Callback<?> callback) {
        List<Callback<?>> callbacks = beanCallbacks.get(type);
        if (callbacks == null) {
            callbacks = new ArrayList<>(16);
            beanCallbacks.put(type, callbacks);
        }
        callbacks.add(callback);
    }
1147167
public void openElementsInfo() {

        CmsResourceInfoDialog.load(
            CmsCoreProvider.get().getStructureId(),
            true,
            CmsContainerpageController.get().getData().getDetailId(),
            new HashMap<String, String>(),
            new CloseHandler<PopupPanel>() {

                public void onClose(CloseEvent<PopupPanel> event) {

                    deactivateCurrentButton();
                    activateSelection();
                }

            });
    }
1078611
@Override
  public void addUpdateListener( AsyncCallback<T> callback )
  {
    DataSubscription subscription = new DataSubscription( RTDataEvents.updated, tableName, createCallback( callback ) );
    addEventListener( subscription );
  }
977918
function addCallback (t, data) {
  var result = data.result || data.error;
  cbid = data.id;
  if (t.callbacks[cbid]) {
    if (data.result) {
      t.callbacks[cbid](result);
    } else {
      t.callbacks[cbid](result, 'error');
    }
  }
}
643013
public void getNewOptions(final String clientId, final I_CmsSimpleCallback<CmsDialogOptionsAndInfo> callback) {

        CmsRpcAction<CmsDialogOptionsAndInfo> action = new CmsRpcAction<CmsDialogOptionsAndInfo>() {

            @Override
            public void execute() {

                getContainerpageService().getNewOptions(
                    clientId,
                    getData().getRpcContext().getPageStructureId(),
                    getData().getRequestParams(),
                    this);
            }

            @Override
            protected void onResponse(CmsDialogOptionsAndInfo result) {

                callback.execute(result);
            }
        };

        action.execute();
    }