Examples of FormDescriptor


Examples of com.volantis.mcs.protocols.forms.FormDescriptor

        assertNotNull(entryPaneInstance);
        assertNotNull(captionPaneInstance);
        assertTrue("Panes should be exactly the same",
                   entryPaneInstance == captionPaneInstance);

        FormDescriptor descriptor = new FormDescriptor();
        XFFormElementImpl formElement = new XFFormElementImpl();
        Form form = new Form(new CanvasLayout());
        form.setName("form-name");
        FormInstance formInstance = new FormInstance(
                NDimensionalIndex.ZERO_DIMENSIONS);
View Full Code Here

Examples of com.volantis.mcs.protocols.forms.FormDescriptor

        TestMarinerPageContext context = new TestMarinerPageContext();
        context.setVolantis(volantis);
        context.setRequestURL(new MarinerURL("http://a.url"));

        FormDescriptor fd = new FormDescriptor();
        fd.setName(formName);
        final FormDataManager formDataManager = context.getFormDataManager();
        String formSpecifier = formDataManager.getFormSpecifier(fd);

        context.setPolicyReferenceResolver(referenceResolverMock);
View Full Code Here

Examples of com.volantis.mcs.protocols.forms.FormDescriptor

        FormInstance formInstance = new FormInstance(
                NDimensionalIndex.ZERO_DIMENSIONS);
        formInstance.setFormat(form);

        XFFormAttributes formAtts = new XFFormAttributes();
        formAtts.setFormDescriptor(new FormDescriptor());

        atts.setFormData(formInstance);
        atts.setFormAttributes(formAtts);
        atts.setName("TestSelect");
        atts.setId("TestID");
View Full Code Here

Examples of com.volantis.mcs.protocols.forms.FormDescriptor

        TestMarinerRequestContext requestContext = new TestMarinerRequestContext();
        ContextInternals.setEnvironmentContext(requestContext,
                new TestEnvironmentContext());

        TestMarinerPageContext pageContext = new TestMarinerPageContext();
        FormDescriptor fd = new FormDescriptor();
        String formSpecifier =
                pageContext.getFormDataManager().getFormSpecifier(fd);
        ContextInternals.setMarinerPageContext(requestContext, pageContext);
        pageContext.pushRequestContext(requestContext);
        protocol.setMarinerPageContext(pageContext);
View Full Code Here

Examples of com.volantis.mcs.protocols.forms.FormDescriptor

                                             String requestPath) {

        // Create test objects.
        final String formSpecifier = "s0";
        final String contextPathString = "/context/";
        final FormDescriptor fd = new FormDescriptor();

        MarinerPageContextMock pageContext =
                new MarinerPageContextMock("pageContext", expectations);
        EnvironmentContextMock envContext =
                new EnvironmentContextMock("envContext", expectations);
View Full Code Here

Examples of com.volantis.mcs.protocols.forms.FormDescriptor

        //super.setSimpleSingleExpectations();
        protocolConfig.expects.supportsEvents().returns(true);

        EnvironmentContextMock environmentContextMock = new EnvironmentContextMock("environmentContextMock", expectations);
        FormDataManagerMock fdm = new FormDataManagerMock("fdm", expectations);
        FormDescriptor fdesc = new FormDescriptor();
        SessionFormDataMock sessionFormData = new SessionFormDataMock(
                "formData", expectations, "s0", fdesc);

        pageContext.expects.getEnvironmentContext().returns(environmentContextMock).any();
        environmentContextMock.expects.getContextPathURL().returns(new MarinerURL("/")).any();
View Full Code Here

Examples of com.volantis.mcs.protocols.forms.FormDescriptor

        //super.setSimpleMultipleExpectations();
        protocolConfig.expects.supportsEvents().returns(true).any();

        EnvironmentContextMock environmentContextMock = new EnvironmentContextMock("environmentContextMock", expectations);
        FormDataManagerMock fdm = new FormDataManagerMock("fdm", expectations);
        FormDescriptor fdesc = new FormDescriptor();
        SessionFormDataMock sessionFormData = new SessionFormDataMock(
                "formData", expectations, "s0", fdesc);

        pageContext.expects.getEnvironmentContext().returns(environmentContextMock).any();
        environmentContextMock.expects.getContextPathURL().returns(new MarinerURL("/")).any();
View Full Code Here

Examples of com.volantis.mcs.protocols.forms.FormDescriptor

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

        // Create the form descriptor.
        formDescriptor = new FormDescriptor();
        formDescriptor.setName(name);

        pattributes.setFormDescriptor(formDescriptor);

        // Push this element onto the stack of elements.
View Full Code Here

Examples of com.volantis.mcs.protocols.forms.FormDescriptor

                logger.debug("No form.");
            }
            return;
        }

        FormDescriptor formDescriptor = getFormDataManager().
                getSessionFormData(formSpecifier).getFormDescriptor();

        if (formDescriptor == null) {
            if (logger.isDebugEnabled()) {
                logger.debug("No form descriptor for " + formSpecifier);
            }
            return;
        }

        if (logger.isDebugEnabled()) {
            logger.debug("Form descriptor is " + formDescriptor);
        }

        // Return if we are still being fragmented
        value = requestURL.getParameterValue
                (URLConstants.FORM_FRAGMENTATION_PARAMETER);
        if (value != null) {
            if (logger.isDebugEnabled()) {
                logger.debug("No form fragmentation parameter");
            }
            return;
        }

        // Return if we have a next form fragment value
        value = requestURL.getParameterValue(URLConstants.NEXT_FORM_FRAGMENT);
        if (value != null) {
            if (logger.isDebugEnabled()) {
                logger.debug("Selecting next form fragment");
            }
            return;
        }

        // Return if we have a previous form fragment value
        value = requestURL.getParameterValue(URLConstants.PREV_FORM_FRAGMENT);
        if (value != null) {
            if (logger.isDebugEnabled()) {
                logger.debug("Selecting previous form fragment");
            }
            return;
        }

        // Return if we have a reset form fragment value
        value = requestURL.getParameterValue(URLConstants.RESET_FORM_FRAGMENT);
        if (value != null) {
            if (logger.isDebugEnabled()) {
                logger.debug("Resetting form fragment");
            }
            return;
        }

        List fields = formDescriptor.getFields();
        int count = fields.size();

        // This must be a normal submit so extract all the values for the form
        // and put them in the request URL. Look in the session first to see
        // whether it contains any values from previously fragmented forms.
View Full Code Here

Examples of com.volantis.mcs.protocols.forms.FormDescriptor

        SessionFormData sessionFormData = getFormDataManager().
                getSessionFormDataByName(containingFormName);

        EmulatedXFormDescriptor xfd = null;
        if (sessionFormData != null) {
            FormDescriptor fd = sessionFormData.getFormDescriptor();
            if (fd instanceof EmulatedXFormDescriptor) {
                xfd = (EmulatedXFormDescriptor)fd;
            } else {
                throw new IllegalArgumentException("XDIME2 form descriptors " +
                        "must be EmulatedXFormDescriptor instances");
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.