Package com.volantis.mcs.protocols

Examples of com.volantis.mcs.protocols.EventAttributes


        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


                                     String eventName, int eventIndex)
        throws ProtocolException {
        Script script = null;

        // Get the event attributes which have been specified if any.
        EventAttributes events = attributes.getEventAttributes(false);
        if (events == null) {
            if (logger.isDebugEnabled()) {
                logger.debug("No events found for " + eventName
                             + " at " + eventIndex);
            }
        } else {
            // Get the specific event which has been asked for.
            ScriptAssetReference scriptObject = events.getEvent(eventIndex);
            if (scriptObject == null) {
                if (logger.isDebugEnabled()) {
                    logger.debug("No event found for " + eventName
                                 + " at " + eventIndex);
                }
View Full Code Here

        name = attributes.getValue("",
                XDIMEAttribute.REF.toString());

        // Update the event attributes (just in case anyone has registered
        // for this event - not currently expected).
        EventAttributes events = protocolAttributes.getEventAttributes(false);
        context.getXFormBuilder().getCurrentModel().updateEventAttributes(events);
        return XDIMEResult.PROCESS_ELEMENT_BODY;
    }
View Full Code Here

        // Detecting the mode is a bit tricky unfortunately with the current
        // structure in the general case.

        final MarinerPageContext pageContext = getPageContext(context);

        final EventAttributes eventAttributes =
                protocolAttributes.getEventAttributes(true);
        eventMapper.setEventAttributes(eventAttributes);

        // Iterate over any event listeners registered as observers this
        // element,
View Full Code Here

        ((FormFragmentData)fragments.get(currentFragmentIndex)).resetGroup(group);
    }

    // Javadoc inherited.
    public void updateEventAttributes(EventAttributes eventAttributes) {
        EventAttributes eventAtts = attributes.getEventAttributes(true);
        for (int i=0; i< EventConstants.MAX_EVENTS; i++) {
            ScriptAssetReference event = eventAttributes.getEvent(i);
            // only override if the replacing one is non null.
            if (event != null) {
                eventAtts.setEvent(i, event);
            }
        }
    }
View Full Code Here

        if (!protocolConfiguration.supportsEvents()) {
            return;
        }

        EventAttributes eventAttributes
            = attributes.getEventAttributes (false);
        if (eventAttributes == null) {
            return;
        }

        int bit = (1 << eventIndex);

        // If the attribute name is not specified then ignore it.
        String attributeName = eventAttributeNames [eventIndex];
        if (attributeName == null) {
            return;
        }

        // If the supportedEvents mask doesn't have the bit associated
        // with the current event set then ignore it.
        if ((supportedEventsMask & bit) != bit) {
            return;
        }

        ScriptAssetReference userScript = eventAttributes.getEvent (eventIndex);

        addEventAttribute (element, attributeName, userScript, internalScript);
    }
View Full Code Here

        if (!protocolConfiguration.supportsEvents()) {
            return;
        }

        EventAttributes eventAttributes
            = attributes.getEventAttributes (false);
        if (eventAttributes == null) {
            return;
        }

        int bit = 1;
        for (int i = 0; i < EventConstants.MAX_EVENTS;
             i += 1, bit = bit << 1) {

            // If the attribute name is not specified then ignore it.
            String attributeName = eventAttributeNames [i];
            if (attributeName == null) {
                continue;
            }

            // If the supportedEvents mask doesn't have the bit associated
            // with the current event set then ignore it.
            if ((supportedEventsMask & bit) != bit) {
                continue;
            }

            ScriptAssetReference userScript = eventAttributes.getEvent (i);

            addEventAttribute (element, attributeName, userScript, null);
        }
    }
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.