Package com.volantis.mcs.protocols.widgets.attributes

Examples of com.volantis.mcs.protocols.widgets.attributes.MessageAttributes


        // Message element is stylable, so use StyledStrategy there.
        // Message element lies inside not-validable validate element,
        // so its validation strategy must be AnywhereStrategy.
        super(WidgetElements.MESSAGE, context);

        protocolAttributes = new MessageAttributes();
    }
View Full Code Here


    // Javadoc inherited.
    protected void initialiseElementSpecificAttributes(
            XDIMEContextInternal context, XDIMEAttributes attributes)
            throws XDIMEException {
        MessageAttributes messageAttributes = getMessageAttributes();
       
        String messageType = attributes.getValue("", "type");
       
        messageAttributes.setType(messageType);

        if (parent instanceof ValidateElement) {
            ValidateElement validateElement = (ValidateElement) parent;
           
            ValidateAttributes validateAttributes = validateElement.getValidateAttributes();

            VolantisProtocol protocol = getProtocol(context);
           
            // Generate ID for the message element
            if (messageAttributes.getId() == null) {
                messageAttributes.setId(protocol.getMarinerPageContext()
                        .generateUniqueFCID());
            }
           
            // Process the 'type' attribute, and propagate it to the enclosing validate element.
            if ((messageType == null) || messageType.equals("invalid")) {
                validateAttributes.setInvalidMessageElementId(messageAttributes.getId());
            } else if (messageType.equals("empty")) {
                validateAttributes.setEmptyMessageElementId(messageAttributes.getId());
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.widgets.attributes.MessageAttributes

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.