Package com.eviware.x.form

Examples of com.eviware.x.form.XFormDialogBuilder


        if (formAnnotation == null) {
            throw new RuntimeException("formClass is not annotated correctly..");
        }

        MessageSupport messages = MessageSupport.getMessages(tabbedFormClass);
        XFormDialogBuilder builder = XFormFactory.createDialogBuilder(formAnnotation.name());

        for (Field field : tabbedFormClass.getFields()) {
            APage pageAnnotation = field.getAnnotation(APage.class);
            if (pageAnnotation != null) {
                buildForm(builder, pageAnnotation.name(), field.getType(), messages);
            }

            AField fieldAnnotation = field.getAnnotation(AField.class);
            if (fieldAnnotation != null) {
                try {
                    Class<?> formClass = Class.forName(fieldAnnotation.description());
                    buildForm(builder, fieldAnnotation.name(), formClass, messages);
                } catch (Exception e) {
                    SoapUI.logError(e);
                }
            }
        }

        ActionList defaultActions = StringUtils.isBlank(formAnnotation.helpUrl()) ? builder.buildOkCancelActions() : builder
                .buildOkCancelHelpActions(formAnnotation.helpUrl());

        if (actions == null) {
            actions = defaultActions;
        } else {
            actions.addActions(defaultActions);
        }

        XFormDialog dialog = builder.buildDialog(actions, formAnnotation.description(),
                UISupport.createImageIcon(formAnnotation.icon()));

        return dialog;
    }
View Full Code Here


        if (formAnnotation == null) {
            throw new RuntimeException("formClass is not annotated correctly..");
        }

        MessageSupport messages = MessageSupport.getMessages(tabbedFormClass);
        XFormDialogBuilder builder = XFormFactory.createDialogBuilder(formAnnotation.name());

        for (Field field : tabbedFormClass.getFields()) {
            APage pageAnnotation = field.getAnnotation(APage.class);
            if (pageAnnotation != null) {
                buildForm(builder, pageAnnotation.name(), field.getType(), messages);
            }

            AField fieldAnnotation = field.getAnnotation(AField.class);
            if (fieldAnnotation != null) {
                try {
                    Class<?> formClass = Class.forName(fieldAnnotation.description());
                    buildForm(builder, fieldAnnotation.name(), formClass, messages);
                } catch (Exception e) {
                    SoapUI.logError(e);
                }
            }
        }

        ActionList defaultActions = StringUtils.isBlank(formAnnotation.helpUrl()) ? null : builder
                .buildHelpActions(formAnnotation.helpUrl());

        if (actions == null) {
            actions = defaultActions;
        } else {
            defaultActions.addActions(actions);
            actions = defaultActions;
        }

        XFormDialog dialog = builder.buildDialog(actions, formAnnotation.description(),
                UISupport.createImageIcon(formAnnotation.icon()));

        return dialog;
    }
View Full Code Here

        if (formAnnotation == null) {
            throw new RuntimeException("formClass is not annotated correctly..");
        }

        MessageSupport messages = MessageSupport.getMessages(tabbedFormClass);
        XFormDialogBuilder builder = XFormFactory.createDialogBuilder(formAnnotation.name());

        for (Field field : tabbedFormClass.getFields()) {
            APage pageAnnotation = field.getAnnotation(APage.class);
            if (pageAnnotation != null) {
                buildForm(builder, pageAnnotation.name(), field.getType(), messages);
            }
        }

        XFormDialog dialog = builder.buildWizard(formAnnotation.description(),
                UISupport.createImageIcon(formAnnotation.icon()), formAnnotation.helpUrl());

        return dialog;
    }
View Full Code Here

        builder.add("useRegEx", useRegEx);
        return builder.finish();
    }

    private void buildDialog() {
        XFormDialogBuilder builder = XFormFactory.createDialogBuilder("Contains Assertion");
        XForm mainForm = builder.createForm("Basic");

        mainForm.addTextField(CONTENT, "Content to check for", XForm.FieldType.TEXTAREA).setWidth(40);
        mainForm.addCheckBox(IGNORE_CASE, "Ignore case in comparison");
        mainForm.addCheckBox(USE_REGEX, "Use token as Regular Expression");

        dialog = builder.buildDialog(builder.buildOkCancelHelpActions(HelpUrls.SIMPLE_CONTAINS_HELP_URL),
                "Specify options", UISupport.OPTIONS_ICON);
    }
View Full Code Here

        builder.add("useRegEx", useRegEx);
        return builder.finish();
    }

    private void buildDialog() {
        XFormDialogBuilder builder = XFormFactory.createDialogBuilder("NotContains Assertion");
        XForm mainForm = builder.createForm("Basic");

        mainForm.addTextField(CONTENT, "Content to check for", XForm.FieldType.TEXTAREA).setWidth(40);
        mainForm.addCheckBox(IGNORE_CASE, "Ignore case in comparison");
        mainForm.addCheckBox(USE_REGEX, "Use token as Regular Expression");

        dialog = builder.buildDialog(builder.buildOkCancelHelpActions(HelpUrls.SIMPLE_NOT_CONTAINS_HELP_URL),
                "Specify options", UISupport.OPTIONS_ICON);
    }
View Full Code Here

            return null;
        }

        private void buildBasicDialog() {
            XFormDialogBuilder builder = XFormFactory.createDialogBuilder("Basic Authentication");
            XForm mainForm = builder.createForm("Basic");
            mainForm.addLabel("Info", "");
            mainForm.addTextField("Username", "Username for authentication", XForm.FieldType.TEXT);
            mainForm.addTextField("Password", "Password for authentication", XForm.FieldType.PASSWORD);

            basicDialog = builder.buildDialog(builder.buildOkCancelActions(), "Specify Basic Authentication Credentials",
                    UISupport.OPTIONS_ICON);
        }
View Full Code Here

            basicDialog = builder.buildDialog(builder.buildOkCancelActions(), "Specify Basic Authentication Credentials",
                    UISupport.OPTIONS_ICON);
        }

        private void buildNtDialog() {
            XFormDialogBuilder builder = XFormFactory.createDialogBuilder("NT Authentication");
            XForm mainForm = builder.createForm("Basic");
            mainForm.addLabel("Info", "");
            mainForm.addTextField("Username", "Username for authentication", XForm.FieldType.TEXT);
            mainForm.addTextField("Password", "Password for authentication", XForm.FieldType.PASSWORD);
            mainForm.addTextField("Domain", "NT Domain for authentication", XForm.FieldType.TEXT);

            ntDialog = builder.buildDialog(builder.buildOkCancelActions(), "Specify NT Authentication Credentials",
                    UISupport.OPTIONS_ICON);
        }
View Full Code Here

        return false;
    }

    private void buildDialog() {
        XFormDialogBuilder builder = XFormFactory.createDialogBuilder("Step Status Assertion");
        XForm form = builder.createForm("Basic");

        form.addTextField(NAME_FIELD, "Name of this assertion", FieldType.TEXT);
        form.addTextField(MINIMUM_REQUESTS_FIELD, "Minimum number of runs before asserting", FieldType.TEXT);
        form.addTextField(MAX_ERRORS_FIELD, "Maximum number of errors before failing", FieldType.TEXT);
        form.addComboBox(TEST_STEP_FIELD, new String[0], "TestStep to assert");

        dialog = builder.buildDialog(
                builder.buildOkCancelHelpActions(HelpUrls.STEP_STATUS_LOAD_TEST_ASSERTION_HELP_URL),
                "Specify options for this Step Status Assertion", UISupport.OPTIONS_ICON);
    }
View Full Code Here

        setConfiguration(builder.finish());
    }

    private void buildDialog() {
        XFormDialogBuilder builder = XFormFactory.createDialogBuilder("Step TPS Assertion");
        XForm form = builder.createForm("Basic");

        form.addTextField(TestStepTpsAssertion.NAME_FIELD, "Name of this assertion", FieldType.TEXT);
        form.addTextField(TestStepTpsAssertion.MINIMUM_REQUESTS_FIELD, "Minimum steps before asserting", FieldType.TEXT);
        form.addTextField(TestStepTpsAssertion.MIN_VALUE_FIELD, "Minimum required step TPS", FieldType.TEXT);
        form.addTextField(TestStepTpsAssertion.MAX_ERRORS_FIELD, "Maximum number of errors before failing",
                FieldType.TEXT);
        form.addComboBox(TestStepTpsAssertion.TEST_STEP_FIELD, new String[0], "TestStep to assert");

        dialog = builder.buildDialog(builder.buildOkCancelHelpActions(HelpUrls.STEP_TPS_LOAD_TEST_ASSERTION_HELP_URL),
                "Specify options for this Step TPS Assertion", UISupport.OPTIONS_ICON);
    }
View Full Code Here

        setConfiguration(builder.finish());
    }

    private void buildDialog() {
        XFormDialogBuilder builder = XFormFactory.createDialogBuilder("Step Average Assertion");
        XForm form = builder.createForm("Basic");

        form.addTextField(NAME_FIELD, "Name of this assertion", FieldType.TEXT);
        form.addTextField(MINIMUM_REQUESTS_FIELD, "Minimum number of steps before asserting", FieldType.TEXT);
        form.addTextField(MAX_AVERAGE_FIELD, "Maximum allowed average step time", FieldType.TEXT);
        form.addTextField(MAX_ERRORS_FIELD, "Maximum number of allowed errors before failing loadtest (-1 = unlimited)",
                FieldType.TEXT);
        form.addTextField(SAMPLE_INTERVAL_FIELD, "Step count interval between sampling", FieldType.TEXT);
        form.addComboBox(TEST_STEP_FIELD, new String[0], "TestStep to assert");

        dialog = builder.buildDialog(
                builder.buildOkCancelHelpActions(HelpUrls.STEP_AVERAGE_LOAD_TEST_ASSERTION_HELP_URL),
                "Specify options for this Step Average Assertion", UISupport.OPTIONS_ICON);
    }
View Full Code Here

TOP

Related Classes of com.eviware.x.form.XFormDialogBuilder

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.