Examples of ResponseValidationAttributes


Examples of com.volantis.mcs.protocols.response.attributes.ResponseValidationAttributes

     * @param context
     */
    public ResponseValidationElement(XDIMEContextInternal context) {
        super(ResponseElements.VALIDATION, context);

        protocolAttributes = new ResponseValidationAttributes();
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.response.attributes.ResponseValidationAttributes

    public void callCloseOnProtocol(XDIMEContextInternal context)
            throws XDIMEException {
        try {
            VolantisProtocol protocol = getProtocol(context);

            ResponseValidationAttributes validationAttributes = getValidationAttributes();
           
            // Open script element
            ScriptAttributes scriptAttributes = new ScriptAttributes();
           
            scriptAttributes.setLanguage("JavaScript");
           
            scriptAttributes.setType("text/javascript");
           
            protocol.writeOpenScript(scriptAttributes);
           
            StringWriter scriptWriter = new StringWriter();
           
            // Write script content
            scriptWriter.write("Widget.processValidatorResponse(");

            boolean validationPassed = validationAttributes.getResult().equals("passed");

            scriptWriter.write(validationPassed ? "true" : "false");
           
            if (!validationPassed) {
                // Write failure message (if not specified, write default message.
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.