Examples of XDIMEException


Examples of com.volantis.mcs.xdime.XDIMEException

                inputId = getProtocol(context).getMarinerPageContext().generateUniqueFCID();
                ((StyledXFormsElement)parent).getProtocolAttributes().setId(inputId);
            }
            ((AutocompleteAttributes)protocolAttributes).setInputId(inputId);
        } else {
            throw new XDIMEException("widget:autocomplete element must be inside XForm input element");
        }
        super.callCloseOnProtocol(context);               
    
View Full Code Here

Examples of com.volantis.mcs.xdime.XDIMEException

                        getProtocol(context), protocolAttributes);
               
            } catch (ProtocolException e) {
                logger.error("rendering-error", getTagName(), e);

                throw new XDIMEException(exceptionLocalizer.format(
                        "rendering-error", getTagName()), e);
            }
        }
        if(shouldRenderBody == true) {
            return XDIMEResult.PROCESS_ELEMENT_BODY;
View Full Code Here

Examples of com.volantis.mcs.xdime.XDIMEException

                dynamicMenuRenderer.renderLabelClose(
                        getProtocol(context), protocolAttributes);
               
            } catch (ProtocolException e) {
                logger.error("rendering-error", getTagName(), e);
                throw new XDIMEException(exceptionLocalizer.format(
                        "rendering-error", getTagName()), e);
            }
        }

    }
View Full Code Here

Examples of com.volantis.mcs.xdime.XDIMEException

            ((DOMOutputBuffer) getBodyContentBuffer());
        for (Node node = contentBuffer.getRoot().getHead(); node != null;
             node = node.getNext()) {

            if (!(node instanceof Text)) {
                throw new XDIMEException(LOCALIZER.format(
                    "invalid-meta-content-type",
                    new Object[]{"string", node.getClass().getName()}));
            }
        }
    }
View Full Code Here

Examples of com.volantis.mcs.xdime.XDIMEException

        try {
            protocol.writeOpenHeading1((HeadingAttributes)protocolAttributes);
        } catch (ProtocolException e) {
            logger.error("rendering-error", getTagName(), e);

            throw new XDIMEException(exceptionLocalizer.format(
                "rendering-error", getTagName()), e);
        }
        return XDIMEResult.PROCESS_ELEMENT_BODY;
    }
View Full Code Here

Examples of com.volantis.mcs.xdime.XDIMEException

            return Period.inSeconds(Long.parseLong(periodStr));
        } catch (NumberFormatException e) {
            // If string didn't parse to long property, throw an exception
            // reusing existing localised message, saying that Period was
            // expected, but String was encountered.
            throw new XDIMEException(PeriodContentProcessor.LOCALIZER.format(
                "invalid-meta-content-type", new Object[] {
                    Period.class.getName(), String.class.getName() }));
        }
    }
View Full Code Here

Examples of com.volantis.mcs.xdime.XDIMEException

     */
    protected void checkContentType(final Object content, final Class expected)
            throws XDIMEException {

        if (content == null || !expected.isAssignableFrom(content.getClass())) {
            throw new XDIMEException(LOCALIZER.format(
                "invalid-meta-content-type", new Object[] {
                    expected.getName(), content.getClass().getName()}));
        }
    }
View Full Code Here

Examples of com.volantis.mcs.xdime.XDIMEException

            throws XDIMEException {

        // check the id
        if (id == null) {
            if (!hasPageScope()) {
                throw new XDIMEException(LOCALIZER.format(
                    "invalid-meta-property-scope-page", propertyName));
            }
        } else if (!hasElementScope()) {
            throw new XDIMEException(LOCALIZER.format(
                "invalid-meta-property-scope-element", propertyName));
        }

        checkContent(content, context);

        // store the content
        final MetaData metaData;
        if (id == null) {
            metaData = context.getPageMetaData();
        } else {
            metaData = context.getElementMetaData(id);
        }
        if (multipleInstancesAllowed()) {
            metaData.addPropertyValue(propertyName, content);
        } else {
            if (metaData.setPropertyValue(propertyName, content) != null) {
                throw new XDIMEException(LOCALIZER.format(
                    "meta-property-occurrence-error", propertyName));
            }
        }
    }
View Full Code Here

Examples of com.volantis.mcs.xdime.XDIMEException

        // check the right type
        if (content != null) {
            // check the right type
            checkContentType(content, String.class);
            if (((String) content).length() != 0) {
                throw new XDIMEException(LOCALIZER.format(
                    "empty-meta-content-expected", new Object[]{
                        MetaPropertyHandlerFactory.NO_CACHE, content}));
            }
        }
    }
View Full Code Here

Examples of com.volantis.mcs.xdime.XDIMEException

        Date date = HttpDateParser.parse(dateStr);
        if (date == null) {
            // If string didn't parse to date property, throw an exception
            // reusing existing localised message, saying that Date was
            // expected, but String was encountered.
            throw new XDIMEException(DateTimeContentProcessor.LOCALIZER.format(
                "invalid-meta-content-type", new Object[] {
                    Date.class.getName(), String.class.getName() }));
        }
        return Time.inMilliSeconds(date.getTime());
    }
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.