Examples of XFormBuilder


Examples of com.volantis.mcs.xdime.xforms.model.XFormBuilder

            String eventName,
            String referencedSubmission)
            throws XDIMEException {

        XDIMEContextInternal context = new XDIMEContextImpl();
        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,
                method);

        return context;
    }
View Full Code Here

Examples of com.volantis.mcs.xdime.xforms.model.XFormBuilder

        // XForms controls can only appear in the body element, so at this
        // point we know we've found all of them. Now generate any implicit
        // elements for the last forms model and register the complete form
        // descriptors with the session context.
       
        final XFormBuilder xFormBuilder = context.getXFormBuilder();

        xFormBuilder.generateImplicitElements(protocol);

        xFormBuilder.registerFormDescriptors(protocol);

        // Render Widget closure.
        WidgetModule module = protocol.getWidgetModule();
       
        if (module != null) {
View Full Code Here

Examples of com.volantis.mcs.xdime.xforms.model.XFormBuilder

        // point we know we've found all of them. Now generate any implicit
        // elements for the last forms model and register the complete form
        // descriptors with the session context.
        final VolantisProtocol protocol = getProtocol(context);

        final XFormBuilder xFormBuilder = context.getXFormBuilder();

        xFormBuilder.generateImplicitElements(protocol);

        xFormBuilder.registerFormDescriptors(protocol);

        ListenerEventRegistry eventRegistry =
                pageContext.getListenerEventRegistry();
        // Fail if the page has event listeners which were unused.
        eventRegistry.complete();
View Full Code Here

Examples of com.volantis.mcs.xdime.xforms.model.XFormBuilder

    }

    // Javadoc inherited.
    public void callCloseOnProtocol(XDIMEContextInternal context)
            throws XDIMEException {
        final XFormBuilder xFormBuilder = context.getXFormBuilder();
        xFormBuilder.addItem(itemName, getCharData());
    }
View Full Code Here

Examples of com.volantis.mcs.xdime.xforms.model.XFormBuilder

        // if action is not specified in XDIME, initialise it by empty value
        if(action == null) {
          action = "";
        }       
       
        XFormBuilder builder = context.getXFormBuilder();
        EventAttributes events = protocolAttributes.getEventAttributes(false);
        // todo: add the events to the submission
        builder.addSubmission(id, events, action, method);
    }
View Full Code Here

Examples of com.volantis.mcs.xdime.xforms.model.XFormBuilder

            com.volantis.mcs.xdime.XDIMEAttributes attributes) throws XDIMEException {

        XDIMEResult result = super.doElementStart(context, attributes);

        // Figure out which model this group refers to.
        XFormBuilder xFormBuilder = context.getXFormBuilder();
        containingModel = xFormBuilder.registerGroup(attributes);

        // Update the form fragmentation state if required.
        // Get the styles which determine how this group should be displayed.
        final Styles styles = getStylingEngine(context).getStyles();
        containingModel.pushGroup(styles, getPageContext(context));
View Full Code Here

Examples of com.volantis.mcs.xdime.xforms.model.XFormBuilder

            throws XDIMEException {

        // callCloseOnProtocol assumes that callOpenOnProtocol and
        // initialiseAttributes will have been called first, so duplicate this
        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

Examples of com.volantis.mcs.xdime.xforms.model.XFormBuilder

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

        // update the form and field descriptors
        XFormBuilder builder = context.getXFormBuilder();
        final XFFormFieldAttributes fieldAttributes =
                (XFFormFieldAttributes) protocolAttributes;
        builder.updateControl(fieldDescriptor, fieldAttributes);

        // effectively all xform controls are inline, so render it immediately
        FieldType fieldType = getFieldType();
        try {
            fieldType.doField(getProtocol(context), fieldAttributes);
View Full Code Here

Examples of com.volantis.mcs.xdime.xforms.model.XFormBuilder

        // Set the name attribute (use the value of the ref or submission
        // attribute depending on the element type)
        setNameAttribute(attributes);

        final XFormBuilder builder = context.getXFormBuilder();

        // determine the model that this control should appear in
        XFormModel model = builder.registerControl(attributes);
        pattributes.setContainingXFFormName(model.getID());

        setInitialValue(builder, ref, modelID);

        // populate the field descriptor
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.