Examples of FBScriptHelper


Examples of org.jbpm.formapi.shared.api.FBScriptHelper

            String[] classesNames = classesString.split(",");
            for (String className : classesNames) {
                try {
                    Object obj = ReflectionHelper.newInstance(className);
                    if (obj instanceof FBScriptHelper) {
                        FBScriptHelper helper = (FBScriptHelper) obj;
                        helpersAvailable.put(helper.getName(), className);
                    }
                } catch (Exception e) {
                    bus.fireEvent(new NotificationEvent(Level.ERROR, "Problem loading script helper " + className, e));
                }
            }
        }
        for (Map.Entry<String, String> entry : helpersAvailable.entrySet()) {
            helperSelectionCombo.addItem(entry.getKey());
        }
        addHelperButton.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                String helperName = helperSelectionCombo.getValue(helperSelectionCombo.getSelectedIndex());
                String eventName = eventSelectionCombo.getValue(eventSelectionCombo.getSelectedIndex());
                String helperClassName = helpersAvailable.get(helperName);
                try {
                    FBScriptHelper helper = (FBScriptHelper) ReflectionHelper.newInstance(helperClassName);
                    FBScript fbScript = eventActions.get(eventName);
                    if (fbScript == null) {
                        fbScript = new FBScript();
                        eventActions.put(eventName, fbScript);
                    }
View Full Code Here

Examples of org.jbpm.formapi.shared.api.FBScriptHelper

            @Override
            public void onMoveUp(int index) {
                if (script != null && script.getHelpers() != null) {
                    if (script.getHelpers().size() > index + 1) {
                        List<FBScriptHelper> helpers = script.getHelpers();
                        FBScriptHelper helper = helpers.remove(index);
                        helpers.add(index + 1, helper);
                        script.setHelpers(helpers);
                    }
                }
            }
            @Override
            public void onMoveDown(int index) {
                if (script != null && script.getHelpers() != null) {
                    if (index > 0) {
                        List<FBScriptHelper> helpers = script.getHelpers();
                        FBScriptHelper helper = helpers.remove(index);
                        helpers.add(index - 1, helper);
                        script.setHelpers(helpers);
                    }
                }
            }
View Full Code Here

Examples of org.jbpm.formapi.shared.api.FBScriptHelper

        if (script != null) {
            helpers = script.getHelpers();
        }
        if (helpers == null) {
            helpers = new ArrayList<FBScriptHelper>();
            FBScriptHelper helper = new PlainTextScriptHelper();
            helpers.add(helper);
            helper.setScript(script);
            script.setHelpers(helpers);
        }
        return helpers;
    }
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.