Examples of PAPIException


Examples of com.volantis.mcs.papi.PAPIException

            MenuInternals.setElementDetails(builder, attributes,
                    pageContext.getStylingEngine().getStyles());

        } catch (BuilderException be) {
            logger.error("menu-building-error", be);
            throw new PAPIException(
                    exceptionLocalizer.format("menu-building-error"), be);
        }

        return PROCESS_ELEMENT_BODY;
    }
View Full Code Here

Examples of com.volantis.mcs.papi.PAPIException

            try {
                // End the existing menu group
                builder.endMenuGroup();
            } catch (BuilderException be) {
                logger.error("menu-building-error", be);
                throw new PAPIException(
                        exceptionLocalizer.format("menu-building-error"), be);
            }
        }
        return CONTINUE_PROCESSING;
    }
View Full Code Here

Examples of com.volantis.mcs.papi.PAPIException

        MarinerPageContext pageContext
                = ContextInternals.getMarinerPageContext(context);

        if (!pageContext.isCanvasFirstChild()) {
            logger.error("layout-must-be-first");
            throw new PAPIException(
                    exceptionLocalizer.format("canvas-layout-not-first"));
        }
        logger.info("device-name-info", pageContext.getDeviceName());
        logger.info("device-info", pageContext.getDevice());
        logger.info("device-layout-info", pageContext.getDeviceLayout());
View Full Code Here

Examples of com.volantis.mcs.papi.PAPIException

            // Do the rest of the field processing.
            try {
                doField(pageContext, attributes, pattributes);
            } catch (ProtocolException e) {
                logger.error("rendering-error", pattributes.getTagName(), e);
                throw new PAPIException(exceptionLocalizer.format(
                        "rendering-error",
                        pattributes.getTagName()),
                        e);
            }
        }
View Full Code Here

Examples of com.volantis.mcs.papi.PAPIException

        String regionName = attributes.getName();

        if (regionName == null) {
            logger.error("region-name-missing");
            throw new PAPIException(
                    exceptionLocalizer.format("region-name-missing"));
        }

        FormatReference formatRef =
                FormatReferenceParser.parse(regionName, pageContext);
View Full Code Here

Examples of com.volantis.mcs.papi.PAPIException

                = new com.volantis.mcs.protocols.XFActionAttributes();

        // Validate the type attribute.
        String type = attributes.getType();
        if (type == null) {
            throw new PAPIException(exceptionLocalizer.format("type-required"));
        }

        if (inline()) {
            if (!TYPE_PERFORM.equals(type)) {
                throw new PAPIException(
                        exceptionLocalizer.format("inline-xfaction-type-error",
                                new Object[]{TYPE_PERFORM,
                                        type}));
            }
        } else {
            if (!TYPE_SUBMIT.equals(type) && !TYPE_RESET.equals(type)) {
                // MCSPA0044X="Form xfaction must either be of type '{2}' or '{3}', not '{4}'"
                throw new PAPIException(
                        exceptionLocalizer.format("invalid-xfaction-type",
                                new Object[]{TYPE_SUBMIT,
                                        TYPE_RESET,
                                        type}));
            }
        }

        // Set the type attribute.
        pattributes.setType(type);

        // Set the value attribute, for backward compatability if the value is not
        // set then it defaults to the caption.
        String value = attributes.getValue();
        if (value == null) {
            // This code should be removed when we stop defaulting to the caption
            // value.
            PolicyReferenceResolver resolver =
                    pageContext.getPolicyReferenceResolver();
            TextAssetReference object
                    = resolver.resolveQuotedTextExpression(
                    attributes.getCaption());
            String caption = getPlainText(object);
            if (caption != null) {
                value = caption;
            }
        }
        pattributes.setValue(value);

        // Initialise form field event attributes.
        PAPIInternals.initialiseFieldEventAttributes(pageContext, attributes,
                pattributes);

        // Do the rest of the field processing.
        try {
            doField(pageContext, attributes, pattributes);
        } catch (ProtocolException e) {
            logger.error("rendering-error", pattributes.getTagName(), e);
            throw new PAPIException(
                    exceptionLocalizer.format("rendering-error",
                            pattributes.getTagName()),
                    e);
        }
View Full Code Here

Examples of com.volantis.mcs.papi.PAPIException

        Writer writer = getContentWriter(context, papiAttributes);
        try {
            writer.write(content);
        }
        catch (IOException e) {
            throw new PAPIException(e);
        }
    }
View Full Code Here

Examples of com.volantis.mcs.papi.PAPIException

        Writer writer = getDirectWriter(context);
        try {
            writer.write(content);
        } catch (IOException e) {
            throw new PAPIException(e);
        }
    }
View Full Code Here

Examples of com.volantis.mcs.papi.PAPIException

            accessKey = resolver.resolveQuotedTextExpression(value);
        }

        if (shortcut != null) {
            if (accessKey != null) {
                throw new PAPIException(exceptionLocalizer.
                        format("anchor-shortcut-and-accesskey-error"));
            }
        } else {
            shortcut = accessKey;
        }
View Full Code Here

Examples of com.volantis.mcs.papi.PAPIException

            pageContext.pushContainerInstance(paneInstance);
        } else if (pageContext.getCurrentPane() == null) {
            if (pageContext.getEnclosingRegionInstance() == null) {
                // this element doesn't have a pane specified and the pane and
                // region stacks are empty. This is not allowed.
                throw new PAPIException(
                        exceptionLocalizer.format("pane-name-not-found"));
            }
        }

        // Push this element.
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.