Examples of XFormDialogBuilder


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
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.