Examples of ExecutionCallback


Examples of com.ponysdk.ui.server.basic.PScript.ExecutionCallback

        js.append("window.colors.gray = \"#" + gray.getValue() + "\";");
        js.append("window.colors.grayLight = \"#" + grayLight.getValue() + "\";");
        js.append("window.colors.grayLighter = \"#" + grayLighter.getValue() + "\";");
        js.append("window.colors.white = \"#" + white.getValue() + "\";");
        js.append("less.refresh();");
        PScript.get().execute(js.toString(), new ExecutionCallback() {

            @Override
            public void onSuccess(final String msg) {}

            @Override
View Full Code Here

Examples of com.ponysdk.ui.server.basic.PScript.ExecutionCallback

    protected void executeJS(final String js) {
        commands.add(js);
        history.add(new PLabel("> " + js));
        inputTextBox.setText("");
        PScript.get().execute(js, new ExecutionCallback() {

            @Override
            public void onSuccess(final String msg) {
                history.add(new PLabel(msg));
                scroll.scrollToBottom();
View Full Code Here

Examples of com.ponysdk.ui.server.basic.PScript.ExecutionCallback

        // execute OK
        updateUI(new RequestHandler() {

            @Override
            public void onRequest() {
                PScript.get().execute("var i = 5; i + 2;", new ExecutionCallback() {

                    @Override
                    public void onSuccess(final String msg) {
                        eventsListener.stackCommandResult(new PTestEvent(this, "JS result: 7"));
                    }

                    @Override
                    public void onFailure(final String msg) {
                        log.error(msg);
                    }
                });
            }
        });

        final PTestEvent e1 = eventsListener.poll();
        Assert.assertEquals("JS result: 7", e1.getBusinessMessage());

        // execute KO
        updateUI(new RequestHandler() {

            @Override
            public void onRequest() {
                PScript.get().execute("j + 2;", new ExecutionCallback() {

                    @Override
                    public void onSuccess(final String msg) {
                        log.error(msg);
                    }
View Full Code Here

Examples of org.mule.api.execution.ExecutionCallback

        };
    }

    public static ExecutionCallback<MuleEvent> getRollbackTransactionCallback(final MuleEvent returnObject)
    {
        return new ExecutionCallback() {
            @Override
            public MuleEvent process() throws Exception
            {
                TransactionCoordination.getInstance().getTransaction().setRollbackOnly();
                return returnObject;
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.