Examples of BadFormDesignException


Examples of org.openmrs.module.htmlformentry.BadFormDesignException

            session.getSubmissionController().addAction(new UrlTemplateAction(urlTemplate));
        }
        else {
            String scriptType = getAttribute(node, "script", null);
            if (scriptType == null) {
                throw new BadFormDesignException("<redirectOnSave> tag must specify url or script attribute");
            }
            session.getSubmissionController().addAction(new ScriptAction(scriptType, node.getTextContent()));
        }
        return false; // skip children
    }
View Full Code Here

Examples of org.openmrs.module.htmlformentry.BadFormDesignException

        }
        else if (logicTestStr != null) {
            return processLogicIncludeLogic(session, logicTestStr);
        }
        else {
            throw new BadFormDesignException("Include/exclude tag must have either a velocityTest or logicTest attribute");
        }

    }
View Full Code Here

Examples of org.openmrs.module.htmlformentry.BadFormDesignException

        LogicService ls = Context.getLogicService();
        LogicCriteria logicCriteria = null;
        try {
            logicCriteria = ls.parse(testStr);
        } catch (Exception ex) {
            throw new BadFormDesignException(ex.getMessage());
        }

        if (logicCriteria != null) {
            if ("testing-html-form-entry".equals(session.getPatient().getUuid()))
                return false;
            else {
                try {
                    return ls.eval(session.getPatient(), logicCriteria).toBoolean();
                } catch (Exception ex) {
                    throw new BadFormDesignException(ex.getMessage());
                }
            }
        } else {
            throw new BadFormDesignException("The " + testStr + "is not a valid logic expression");//throw a bad form desigm
        }
    }
View Full Code Here

Examples of org.openmrs.module.htmlformentry.BadFormDesignException

    @Override
    protected String getSubstitution(FormEntrySession session, FormSubmissionController controllerActions, Map<String, String> parameters) throws BadFormDesignException {
        String className = parameters.get("class");
        if (StringUtils.isEmpty(className)) {
            throw new BadFormDesignException("<postSubmissionAction/> tag requires a 'class' attribute");
        }
        session.getSubmissionController().addAction(new Action(className));
        return "";
    }
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.