Examples of NativeMarkupAttributes


Examples of com.volantis.mcs.papi.NativeMarkupAttributes

        assertNotNull("Unknown element name, nativemarkup check testcase.",
            factory);

        PAPIElement element = factory.createPAPIElement();
        NativeMarkupAttributes attributes = (NativeMarkupAttributes)
                factory.createElementSpecificAttributes();

        attributes.setPane("pane");
        attributes.setTargetLocation("pane");

        // Process start element, this is the thing which does
        // the work.
        int result = element.elementStart(getCurrentRequestContext(), attributes);
View Full Code Here

Examples of com.volantis.mcs.papi.NativeMarkupAttributes

        // Check to see if the protocol supports the markup and
        // the conditions for processing the element have been
        // satisfied
        if (protocol.supportsNativeMarkup() &&
                continueProcessing(context, papiAttributes)) {
            NativeMarkupAttributes attributes =
                    (NativeMarkupAttributes) papiAttributes;
            String paneName = attributes.getPane();

            // Get the value of the targetLocation attribute, which could be
            // a text component.
            PolicyReferenceResolver resolver =
                    pageContext.getPolicyReferenceResolver();
            TextAssetReference reference = resolver.resolveQuotedTextExpression(
                    attributes.getTargetLocation());
            String target;
            if (reference != null) {
                target = reference.getText(TextEncoding.PLAIN);
            } else {
                target = null;
View Full Code Here

Examples of com.volantis.mcs.protocols.NativeMarkupAttributes

    protected void doWriteOpenNativeMarkupTest(
        OutputBufferFactory factory,
        TestMarinerPageContext pageContext,
        PageHead pageHead,
        DeviceLayoutContext dlc) throws Exception {
        NativeMarkupAttributes attributes = new NativeMarkupAttributes();

        // Allow the superclass version to do initial tests
        super.doWriteOpenNativeMarkupTest(factory, pageContext, pageHead, dlc);

        // @todo why are these reset?
//        pageHead.setMarinerPageContext(pageContext);
        pageHead.setOutputBufferFactory(factory);

        // Perform the WML-specific additional tests
        attributes.setTargetLocation("wml.deck.head");
        protocol.writeOpenNativeMarkup(attributes);
        assertEquals("native markup written to wrong output buffer for head",
                    protocol.getMarinerPageContext().getCurrentOutputBuffer(),
                    pageHead.getHead());

        attributes.resetAttributes();
        attributes.setTargetLocation("wml.deck.template");
        protocol.writeOpenNativeMarkup(attributes);
        assertEquals("native markup written to wrong output buffer for head",
                    protocol.getMarinerPageContext().getCurrentOutputBuffer(),
                pageHead.getBuffer(WMLRoot.PAGE_TEMPLATE_BUFFER_NAME, false));

        attributes.resetAttributes();
        attributes.setTargetLocation("wml.card.timer");
        protocol.writeOpenNativeMarkup(attributes);
        assertEquals("native markup written to wrong output buffer for timer",
                    protocol.getMarinerPageContext().getCurrentOutputBuffer(),
           dlc.getOutputBuffer(NativeMarkupAttributes.WML_CARD_TIMER, false));

        attributes.resetAttributes();
        attributes.setTargetLocation("wml.card.onevent");
        protocol.writeOpenNativeMarkup(attributes);
        assertEquals("native markup written to wrong output buffer for " +
                     "onevent",
                    protocol.getMarinerPageContext().getCurrentOutputBuffer(),
           dlc.getOutputBuffer(
               NativeMarkupAttributes.WML_CARD_ONEVENT, false));

        attributes.resetAttributes();
        attributes.setTargetLocation("wml.card.beforebody");
        protocol.writeOpenNativeMarkup(attributes);
        assertEquals("native markup written to wrong output buffer for " +
                     "beforebody",
                    protocol.getMarinerPageContext().getCurrentOutputBuffer(),
           dlc.getOutputBuffer(
View Full Code Here

Examples of com.volantis.mcs.protocols.NativeMarkupAttributes

    protected void doWriteCloseNativeMarkupTest(
        TestMarinerPageContext pageContext,
        PageHead pageHead,
        DeviceLayoutContext dlc,
        DOMOutputBuffer buffer) throws Exception {
        NativeMarkupAttributes attributes = new NativeMarkupAttributes();

        super.doWriteCloseNativeMarkupTest(pageContext,
                                           pageHead,
                                           dlc,
                                           buffer);

        attributes.setTargetLocation("wml.deck.head");
        protocol.writeOpenNativeMarkup(attributes);
        assertEquals("native markup written to wrong output buffer for head",
                    protocol.getMarinerPageContext().getCurrentOutputBuffer(),
                    pageHead.getHead());
        protocol.writeCloseNativeMarkup(attributes);
        // Check that output buffers have been removed from stack
        assertEquals("after closeNativeMarkup wrong output buffer on stack",
                    buffer, pageContext.getCurrentOutputBuffer());

        attributes.resetAttributes();
        attributes.setTargetLocation("wml.deck.template");
        protocol.writeOpenNativeMarkup(attributes);
        assertEquals("native markup written to wrong output buffer for head",
                    protocol.getMarinerPageContext().getCurrentOutputBuffer(),
                pageHead.getBuffer(WMLRoot.PAGE_TEMPLATE_BUFFER_NAME, false));
        protocol.writeCloseNativeMarkup(attributes);
        // Check that output buffers have been removed from stack
        assertEquals("after closeNativeMarkup wrong output buffer on stack",
                    buffer, pageContext.getCurrentOutputBuffer());

        attributes.resetAttributes();
        attributes.setTargetLocation("wml.card.timer");
        protocol.writeOpenNativeMarkup(attributes);
        assertEquals("native markup written to wrong output buffer for timer",
                    protocol.getMarinerPageContext().getCurrentOutputBuffer(),
           dlc.getOutputBuffer(NativeMarkupAttributes.WML_CARD_TIMER, false));
        protocol.writeCloseNativeMarkup(attributes);
        // Check that output buffers have been removed from stack
        assertEquals("after closeNativeMarkup wrong output buffer on stack",
                    buffer, pageContext.getCurrentOutputBuffer());

        attributes.resetAttributes();
        attributes.setTargetLocation("wml.card.onevent");
        protocol.writeOpenNativeMarkup(attributes);
        assertEquals("native markup written to wrong output buffer for onevent",
                    protocol.getMarinerPageContext().getCurrentOutputBuffer(),
           dlc.getOutputBuffer(NativeMarkupAttributes.WML_CARD_ONEVENT, false));
        protocol.writeCloseNativeMarkup(attributes);
        // Check that output buffers have been removed from stack
        assertEquals("after closeNativeMarkup wrong output buffer on stack",
                    buffer, pageContext.getCurrentOutputBuffer());

        attributes.resetAttributes();
        attributes.setTargetLocation("wml.card.beforebody");
        protocol.writeOpenNativeMarkup(attributes);
        assertEquals("native markup written to wrong output buffer for beforebody",
                    protocol.getMarinerPageContext().getCurrentOutputBuffer(),
           dlc.getOutputBuffer(NativeMarkupAttributes.WML_CARD_BEFOREBODY, false));
        protocol.writeCloseNativeMarkup(attributes);
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.