Package com.volantis.mcs.xdime

Examples of com.volantis.mcs.xdime.XDIMEAttributesImpl


        final XFormBuilder xFormBuilder = context.getXFormBuilder();
        EmulatedXFormDescriptor fd = new EmulatedXFormDescriptor();
        xFormBuilder.addModel(MODEL_ID, fd);
        context.setInitialRequestContext(requestContext);

        attributes = new XDIMEAttributesImpl(XFormElements.SETVALUE);
        attributes.setValue(XDIMESchemata.XML_EVENTS_NAMESPACE, "event", eventName);
        attributes.setValue("", XDIMEAttribute.REF.toString(), referencedSubmission);
        attributes.setValue("", XDIMEAttribute.VALUE.toString(), VALUE_FROM_ATTRIBUTE);
        xFormBuilder.registerControl(attributes);
        xFormBuilder.addSubmission(submissionID, new EventAttributes(), action,
View Full Code Here


     * get the xdime attributes specified for the link element. this is
     * dependant on the value of rel
     * @return
     */
    private XDIMEAttributesImpl getXDIMEAttributes() {
        XDIMEAttributesImpl attributes =
                new XDIMEAttributesImpl(XHTML2Elements.LINK);

        attributes.setValue("", "rel", rel);
        attributes.setValue("", "href", "test");
        return attributes;
    }
View Full Code Here

    private void setupLink() throws XDIMEException {
        XDIMEContextInternal xdimeContext = getXDIMEContextInernal();

        LinkElement link = new LinkElement(xdimeContext);

        XDIMEAttributesImpl attributes = getXDIMEAttributes();

        link.callOpenOnProtocol(xdimeContext, attributes);
    }
View Full Code Here

        XFormModel model = builder.addModel(MODEL_ID, TEST_FD);
        XFormModel model2 = builder.addModel(MODEL_ID2, TEST_FD2);
        assertNull(builder.modelBeingWritten);

        XDIMEAttributes attributes =
                new XDIMEAttributesImpl(XFormElements.INPUT);
        attributes.setValue("", XDIMEAttribute.ID.toString(), CONTROL_ID);
        attributes.setValue("", XDIMEAttribute.REF.toString(), null);
        attributes.setValue("", XDIMEAttribute.MODEL.toString(), MODEL_ID);
        builder.registerControl(attributes);
        assertEquals(model, builder.modelBeingWritten);

        XDIMEAttributes attributes2 = new XDIMEAttributesImpl(
                XFormElements.INPUT);
        attributes2.setValue("", XDIMEAttribute.ID.toString(), CONTROL_ID2);
        attributes2.setValue("", XDIMEAttribute.REF.toString(), null);
        attributes2.setValue("", XDIMEAttribute.MODEL.toString(), MODEL_ID2);
        builder.registerControl(attributes2);
        assertEquals(model2, builder.modelBeingWritten);
    }
View Full Code Here

        builder.addSubmission(SUBMISSION_ID2, events, ACTION, METHOD);

        assertNull(builder.modelBeingWritten);

        XDIMEAttributes attributes =
                new XDIMEAttributesImpl(XFormElements.INPUT);
        attributes.setValue("", XDIMEAttribute.ID.toString(), CONTROL_ID);
        attributes.setValue("", XDIMEAttribute.REF.toString(), null);
        attributes.setValue("", XDIMEAttribute.MODEL.toString(), null);
        attributes.setValue("", XDIMEAttribute.SUBMISSION.toString(), SUBMISSION_ID);
        builder.registerControl(attributes);
        assertEquals(model, builder.modelBeingWritten);

        XDIMEAttributes attributes2 = new XDIMEAttributesImpl(
                XFormElements.INPUT);
        attributes2.setValue("", XDIMEAttribute.ID.toString(), CONTROL_ID2);
        attributes2.setValue("", XDIMEAttribute.REF.toString(), null);
        attributes2.setValue("", XDIMEAttribute.MODEL.toString(), null);
        attributes2.setValue("", XDIMEAttribute.SUBMISSION.toString(), SUBMISSION_ID2);

        builder.registerControl(attributes2);
        assertEquals(model2, builder.modelBeingWritten);
    }
View Full Code Here

        XFormModel model = builder.addModel(MODEL_ID, TEST_FD);
        XFormModel model2 = builder.addModel(MODEL_ID2, TEST_FD2);
        assertNull(builder.modelBeingWritten);

        XDIMEAttributes attributes =
                new XDIMEAttributesImpl(XFormElements.INPUT);
        attributes.setValue("", XDIMEAttribute.ID.toString(), CONTROL_ID);
        attributes.setValue("", XDIMEAttribute.REF.toString(), null);
        attributes.setValue("", XDIMEAttribute.MODEL.toString(), MODEL_ID);
        builder.registerControl(attributes);
        assertEquals(model, builder.modelBeingWritten);

        XDIMEAttributes attributes2 =
                new XDIMEAttributesImpl(XFormElements.INPUT);
        attributes2.setValue("", XDIMEAttribute.ID.toString(), CONTROL_ID2);
        attributes2.setValue("", XDIMEAttribute.REF.toString(), null);
        attributes2.setValue("", XDIMEAttribute.MODEL.toString(), MODEL_ID2);
        builder.registerControl(attributes2);
        assertEquals(model2, builder.modelBeingWritten);

        try {
            builder.registerControl(attributes2);
View Full Code Here

        XFormModel model = builder.addModel(MODEL_ID, TEST_FD);
        builder.addModel(MODEL_ID2, TEST_FD2);
        assertNull(builder.modelBeingWritten);

        XDIMEAttributes attributes =
                new XDIMEAttributesImpl(XFormElements.INPUT);
        attributes.setValue("", XDIMEAttribute.ID.toString(), CONTROL_ID);
        attributes.setValue("", XDIMEAttribute.REF.toString(), null);
        attributes.setValue("", XDIMEAttribute.MODEL.toString(), MODEL_ID);
        builder.registerControl(attributes);
        assertEquals(model, builder.modelBeingWritten);

        XDIMEAttributes attributes2 =
                new XDIMEAttributesImpl(XFormElements.INPUT);
        attributes2.setValue("", XDIMEAttribute.ID.toString(), CONTROL_ID2);
        attributes2.setValue("", XDIMEAttribute.REF.toString(), null);
        attributes2.setValue("", XDIMEAttribute.MODEL.toString(), MODEL_ID);
        builder.registerControl(attributes2);
        assertEquals(model, builder.modelBeingWritten);
    }
View Full Code Here

    /**
     * get xdime attributes
     * @return
     */
    private XDIMEAttributes getXDIMEAttributes() {
        XDIMEAttributesImpl attributes =
                new XDIMEAttributesImpl(XHTML2Elements.BODY);

        return attributes;
    }
View Full Code Here

        XDIMEContextInternal context = new XDIMEContextImpl();
        final XFormBuilder xFormBuilder = context.getXFormBuilder();
        final String modelID = "modelID";
        EmulatedXFormDescriptor fd = new EmulatedXFormDescriptor();
        xFormBuilder.addModel(modelID, fd);
        XDIMEAttributes attributes = new XDIMEAttributesImpl(getElementType());
        attributes.setValue("", XDIMEAttribute.ID.toString(), "controlID");
        attributes.setValue("", XDIMEAttribute.MODEL.toString(), modelID);
        xFormBuilder.registerControl(attributes);

        context.setInitialRequestContext(marinerRequestContextMock);

        return context;
View Full Code Here

        ordered = mockFactory.createOrderedBuilder();

        context =
            new XDIMEContextInternalMock("context", ordered);
        attributes = new XDIMEAttributesImpl(XFormElements.GROUP);
        builder = new XFormBuilderMock("builder", ordered);
        model = new XFormModelMock("model", ordered);

        styles = new StylesMock("styles", ordered);
        requestContext =
View Full Code Here

TOP

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

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.