Package com.volantis.mcs.protocols

Examples of com.volantis.mcs.protocols.EventAttributes


        assertEquals("Buffer should be unchanged",
                     "",
                     DOMUtilities.toString(
                             buffer.getRoot(), protocol.getCharacterEncoder()));

        EventAttributes events = attributes.getEventAttributes (false);
        events.reset();
        events.setEvent(EventConstants.ON_ENTER_BACKWARD, "Test event backward");
        events.setEvent(EventConstants.ON_ENTER_FORWARD, "Test event forward");
        protocol.addEnterEvents(buffer, attributes);
        String expected = transformMarkup(
                "<root><onevent type=\"onenterforward\">Test event forward" +
                "</onevent><onevent type=\"onenterbackward\">" +
                "Test event backward</onevent></root>", protocol);
View Full Code Here


        assertEquals("Buffer should be unchanged",
                     "",
                     DOMUtilities.toString(
                             buffer.getRoot(), protocol.getCharacterEncoder()));

        EventAttributes events = attributes.getEventAttributes (false);
        events.reset();
        events.setEvent(EventConstants.ON_ENTER_BACKWARD, "Test event backward");
        protocol.addOnEventElement(buffer, attributes, "testEvent",
                                   EventConstants.ON_ENTER_BACKWARD);
        String expected = transformMarkup(
                "<onevent type=\"testEvent\">Test event backward</onevent>",
                protocol);
View Full Code Here

     */
    protected PhoneNumberAttributes createPhoneNumberAttributes(
        TextAssetReference fullNumber) {
        PhoneNumberAttributes phoneNumberAttributes =
            super.createPhoneNumberAttributes(fullNumber);
        EventAttributes eventAttributes =
            phoneNumberAttributes.getEventAttributes(true);

        // Add all the events
        for (int i = 0;
             i < EventConstants.MAX_EVENTS;
             i++) {
            eventAttributes.setEvent(i, "set");
        }

        return phoneNumberAttributes;
    }
View Full Code Here

    // Javadoc inherited.
    public void mergeEventAttribute(MCSAttributes attributes, int event,
            String script) throws RendererException {
       
        // Just render the event as simply as possible.
        EventAttributes eventAttrs = attributes.getEventAttributes(true);
        eventAttrs.setEvent(event, script);
    }
View Full Code Here

        papiAttributes.setOnLoad(ON_LOAD);
        papiAttributes.setOnUnload(ON_UNLOAD);
        CanvasAttributes attributes = new CanvasAttributes();

        EventAttributes events = attributes.getEventAttributes(false);
        ScriptAssetReference event = events.getEvent(EventConstants.ON_LOAD);
        assertNull(event);
        PAPIInternals.initialisePageEventAttributes(pageContext,
                                                    papiAttributes,
                                                    attributes);
        event = events.getEvent(EventConstants.ON_LOAD);
        assertNotNull(event);
        assertEquals(ON_LOAD, event.getScript());

        event = events.getEvent(EventConstants.ON_UNLOAD);
        assertNotNull(event);
        assertEquals(ON_UNLOAD, event.getScript());

        // Other events should not have been set.
        event = events.getEvent(EventConstants.ON_CLICK);
        assertNull(event);
    }
View Full Code Here

        papiAttributes.setOnSubmit(ON_SUBMIT);
        papiAttributes.setOnReset(ON_RESET);

        CanvasAttributes attributes = new CanvasAttributes();

        EventAttributes events = attributes.getEventAttributes(false);
        ScriptAssetReference event = events.getEvent(EventConstants.ON_LOAD);
        assertNull(event);
        PAPIInternals.initialiseFormEventAttributes(pageContext,
                                                    papiAttributes,
                                                    attributes);
        event = events.getEvent(EventConstants.ON_SUBMIT);
        assertNotNull(event);
        assertEquals(ON_SUBMIT, event.getScript());

        event = events.getEvent(EventConstants.ON_RESET);
        assertNotNull(event);
        assertEquals(ON_RESET, event.getScript());

        // Other events should not have been set.
        event = events.getEvent(EventConstants.ON_CLICK);
        assertNull(event);
    }
View Full Code Here

            String expected) {

        addScriptExpressionExpectations(expected);

        CanvasAttributes attributes = new CanvasAttributes();
        EventAttributes events = attributes.getEventAttributes(false);
        ScriptAssetReference event = events.getEvent(constant);
        assertNull(event);
        PAPIInternals.initialiseFocusEventAttributes(pageContext,
                                                    papiAttributes,
                                                    attributes);
        event = events.getEvent(constant);
        assertEquals(expected, event);
    }
View Full Code Here

            String expected) {

        addScriptExpressionExpectations(expected);

        CanvasAttributes attributes = new CanvasAttributes();
        EventAttributes events = attributes.getEventAttributes(false);
        ScriptAssetReference event = events.getEvent(constant);
        assertNull(event);
        PAPIInternals.initialiseFieldEventAttributes(pageContext,
                                                    papiAttributes,
                                                    attributes);
        event = events.getEvent(constant);
        assertEquals(expected, event);
    }
View Full Code Here

            String expected) {

        addScriptExpressionExpectations(expected);

        CanvasAttributes attributes = new CanvasAttributes();
        EventAttributes events = attributes.getEventAttributes(false);
        ScriptAssetReference event = events.getEvent(constant);
        assertNull(event);
        PAPIInternals.initialiseGeneralEventAttributes(pageContext,
                                                       papiAttributes,
                                                       attributes);
        event = events.getEvent(constant);
        assertEquals(expected, event);
    }
View Full Code Here

        if (addExpectation) {
            addScriptExpressionExpectations(expected);
        }

        CanvasAttributes attributes = new CanvasAttributes();
        EventAttributes events = attributes.getEventAttributes(false);
        ScriptAssetReference event = events.getEvent(constant);
        assertNull(event);
        PAPIInternals.initialiseCanvasEventAttributes(pageContext,
                                                       papiAttributes,
                                                       attributes);
        event = events.getEvent(constant);
        assertEquals(expected, event);
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.EventAttributes

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.