Package com.volantis.mcs.layouts

Examples of com.volantis.mcs.layouts.Form


        attributes.setValue(xfValue);

        XFFormAttributes formAttributes = new XFFormAttributes();
        String name = "This is the name";
        formAttributes.setName(name);
        Form form = new Form(new CanvasLayout());
        FormInstance formInstance = new FormInstance(
                NDimensionalIndex.ZERO_DIMENSIONS);
        formInstance.setFormat(form);

        formAttributes.setFormData(formInstance);
View Full Code Here


        attributes.setEntryContainerInstance(new PaneInstance(null));
        attributes.setShortcut(new LiteralTextAssetReference("shortcut"));
        attributes.setName("name");
        FormInstance formInstance = new FormInstance(NDimensionalIndex.ZERO_DIMENSIONS);
        formInstance.setFormat(new Form(null));
        attributes.setFormData(formInstance);

        DoSelectInputTestHelper helper = new DoSelectInputTestHelper();
        helper.addOption(attributes,"Caption","Prompt","Value",false);
       
View Full Code Here

        attributes.setName("name");
        attributes.setInitial("E");

        FormInstance formInstance = new FormInstance(
                NDimensionalIndex.ZERO_DIMENSIONS);
        formInstance.setFormat(new Form(null));
        attributes.setFormData(formInstance);
    }
View Full Code Here

    public void testOpenGrid() {
        privateSetUp();
        GridAttributes attributes = new GridAttributes();
        attributes.setStyles(StylesBuilder.getDeprecatedStyles());

        attributes.setFormat(new Form(new CanvasLayout()));
        buffer.addStyledElement("table", attributes);
        protocol.openGrid(buffer, attributes);
        Element e = buffer.getCurrentElement();
        assertNull(e.getAttributeValue("columns"));
    }
View Full Code Here

    /**
     * Test the URLRewriting aspect of doFormLink.
     */
    public void testDoFormLinkURLRewriting() throws Throwable {
        CanvasLayout layout = new CanvasLayout();
        Form form = new Form(layout);
        final String formName = "form";
        final String fragmentName = "formFragment";
        form.setName(formName);

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

        final PolicyReferenceResolverMock referenceResolverMock =
                new PolicyReferenceResolverMock("referenceResolverMock",
                        expectations);
        referenceResolverMock.expects.
                resolveQuotedTextExpression(fragmentName).returns(null);
        MarinerApplication application = new MarinerServletApplication();
        MarinerConfiguration config = new MarinerConfiguration();
        Volantis volantis = getVolantis();
        PrivateAccessor.setField(volantis, "marinerConfig", config);
        PrivateAccessor.invoke(volantis, "initializeURLRewriters",
                new Class [] {MarinerApplication.class},
                new Object [] { application });

        final String testURL = "http://test/url";

        PageURLRewriter layoutURLRewriter = new PageURLRewriter() {
            public MarinerURL rewriteURL(MarinerRequestContext context,
                                         MarinerURL url,
                                         PageURLDetails details) {
                return new MarinerURL(testURL);
            }
        };
        PrivateAccessor.setField(volantis, "layoutURLRewriter",
                layoutURLRewriter);

        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);

        context.pushDeviceLayoutContext(new DeviceLayoutContext());
        PageGenerationCache pageGenerationCache = new PageGenerationCache();
        pageGenerationCache.createFormFragmentationStates(form.getName());
        context.setPageGenerationCache(pageGenerationCache);
        protocol.setMarinerPageContext(context);
        if(protocol.getPageHead()==null) {
            protocol.initialisePageHead();
        }
View Full Code Here

        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);
        formInstance.setFormat(form);

        formElement.getProtocolAttributes().setFormData(formInstance);
View Full Code Here

                PolicyReferenceResolverTestHelper.getCommonExpectations(
                        expectations, mockFactory));

        // Create Form layout object
        CanvasLayout canvasLayout = new CanvasLayout();
        Form form = new Form(canvasLayout);
        form.setName("form");

        // Activate the device layout.
        RuntimeDeviceLayout runtimeDeviceLayout =
                RuntimeDeviceLayoutTestHelper.activate(canvasLayout);
View Full Code Here

     */
    public XFFormElementImpl createDummyFormElement(Pane defaultPane) {

        final Pane pane = defaultPane;

        final Form form = new Form((CanvasLayout) defaultPane.getLayout()) {
            public Pane getDefaultPane() {
                return pane;
            }
        };

View Full Code Here

        testable.setPageHead(new TestPageHead(protocol));
        XFActionAttributes attributes = new XFActionAttributes();
        attributes.setStyles(StylesBuilder.getInitialValueStyles());

        XFFormAttributes formAttributes = new XFFormAttributes();
        Form form = new Form(new CanvasLayout());
        FormInstance formInstance = new FormInstance(
                NDimensionalIndex.ZERO_DIMENSIONS);
        formInstance.setFormat(form);
        formAttributes.setAction(new LiteralLinkAssetReference("testaction"));
        formAttributes.setFormData(formInstance);
View Full Code Here

        atts.setStyles(styles);
        styles.getPropertyValues().setComputedValue(
                StylePropertyDetails.TEXT_ALIGN,
                TextAlignKeywords._INTERNAL_DEFERRED_INHERIT);

        Form form = new Form(null) {
            public boolean isFragmented() {
                return false;
            }
        };
        FormInstance formInstance = new FormInstance(
View Full Code Here

TOP

Related Classes of com.volantis.mcs.layouts.Form

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.