Package com.volantis.mcs.xdime

Examples of com.volantis.mcs.xdime.XDIMEElementInternal


                .any();
        objectMock.expects.getOutputState().returns(null);

        // Do the equivalent of #pushElement but without getting element
        // output state builder.
        XDIMEElementInternal elementImpl = objectMock;

        DocumentValidator validator = xdimeContext.getDocumentValidator();
        validator.open(elementImpl.getElementType());
        xdimeContext.pushElement(objectMock);

        startDocument();

        AttributesImpl attr = new AttributesImpl();
View Full Code Here


    }   

    public void callCloseOnProtocol(XDIMEContextInternal context)
            throws XDIMEException {

        XDIMEElementInternal xdimeElement = context.getCurrentElement();
        if (xdimeElement instanceof Refreshable) {
            ((Refreshable) xdimeElement)
                    .setRefreshAttributes(getRefreshAttributes());
        }
    }
View Full Code Here

    protected void initialiseElementSpecificAttributes(
            XDIMEContextInternal context, XDIMEAttributes attributes)
            throws XDIMEException {
        DetailAttributes detailAttributes = (DetailAttributes) protocolAttributes;

        XDIMEElementInternal parent = context.getCurrentElement().getParent();
       
        if (parent != null && parent.getElementType() == GalleryElements.ITEM) {
            detailAttributes.setInsideGalleryItem(true);
        }
    }
View Full Code Here

        // Parent is a TabElement
        if (parent instanceof Loadable) {
            ((Loadable) parent).setLoadAttributes(getLoadAttributes());
        }
        // Parent is a DetailElement, grand parent is FoldingItemElement.
        XDIMEElementInternal grandParent = parent.getParent();
        if (grandParent instanceof Loadable) {
            ((Loadable) grandParent).setLoadAttributes(getLoadAttributes());
        }
    }
View Full Code Here

    protected void initialiseElementSpecificAttributes(
            XDIMEContextInternal context, XDIMEAttributes attributes)
            throws XDIMEException {
        SummaryAttributes summaryAttributes = (SummaryAttributes) protocolAttributes;

        XDIMEElementInternal parent = context.getCurrentElement().getParent();
       
        if (parent != null && parent.getElementType() == GalleryElements.ITEM) {
            summaryAttributes.setInsideGalleryItem(true);
        }
    }
View Full Code Here

    // Javadoc inherited
    protected XDIMEResult callOpenOnProtocol(
            XDIMEContextInternal context, XDIMEAttributes attributes)
        throws XDIMEException {

        XDIMEElementInternal foundElement1 = ElementUtils.getContainingElement(
                parent, ELEMENTS_WITH_CAPTION_FILTER);

        XDIMEElementInternal foundElement = foundElement1;

        if (foundElement instanceof TableElement) {
            openTableCaption(context, (TableElement)foundElement);

        } else if (foundElement instanceof ObjectElement) {
View Full Code Here

    // Javadoc inherited
    protected void callCloseOnProtocol(XDIMEContextInternal context)
        throws XDIMEException {

        XDIMEElementInternal foundElement = ElementUtils.getContainingElement(
                parent, ELEMENTS_WITH_CAPTION_FILTER);

        XDIMEElementInternal object = foundElement;

        if (object instanceof TableElement) {
            closeTableCaption(context);

        } else if (object instanceof ObjectElement) {
View Full Code Here

     *         the supplied classes or null if none found.
     */
    public static XDIMEElementInternal getContainingElement(
            XDIMEElementInternal element, Filter filter) {

        XDIMEElementInternal foundElement = null;
        while (foundElement == null && element != null) {

            if (filter.matches(element)) {
                foundElement = element;
            } else {
View Full Code Here

        if (charData != null) {
            value = charData;
        }
        // Retrieve this element's parent from the stack (should only be
        // permitted as a child of a submit element).
        XDIMEElementInternal element = context.getCurrentElement();
        if (element instanceof XFSubmitElementImpl) {
            // If an action field is tagged to indicate that its query
            // parameters should contain an extra name value pair (used to
            // indicate things like which of two submit buttons was pressed to
            // trigger the submission) then HTMLActionFieldHandler appends this
            // name value pair using the name and initial value specified in
            // the field descriptor of the submit element. In order for our
            // parent submit element to set this flag, we should set the
            // initial value to the value specified.
            XFActionAttributes parentAttributes = ((XFActionAttributes)
                    ((XFSubmitElementImpl)element).getProtocolAttributes());
            parentAttributes.setName(name);
            parentAttributes.setInitial(value);
            parentAttributes.setValue(value);
           
            FieldDescriptor fd = parentAttributes.getFieldDescriptor();
            fd.setName(name);
            fd.setInitialValue(value);           
        } else {           
            String localizedException = EXCEPTION_LOCALIZER.format(
                    "xforms-invalid-setvalue-parent",
                    element.getElementType().getLocalName());
            LOGGER.error(localizedException);
            throw new XDIMEException(localizedException);
        }
    }
View Full Code Here

       
        feedAttributes.setChannel(attributes.getValue("", "channel"));
        feedAttributes.setItemDisplay(attributes.getValue("", "item-display"));
    
        // Store the attributes in its parent, if it's feedable.
        XDIMEElementInternal parent = getParent();
       
        if (parent instanceof Feedable) {
            Feedable feedable = (Feedable) parent;
           
            feedable.setFeedAttributes(feedAttributes);
View Full Code Here

TOP

Related Classes of com.volantis.mcs.xdime.XDIMEElementInternal

Copyright © 2018 www.massapicom. 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.