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

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


     * @param context The XDIME context
     */
    public DisplayElement(XDIMEContextInternal context){
        super(WidgetElements.DISPLAY, context);
       
        protocolAttributes = new DisplayAttributes();
    }
View Full Code Here


     * @inheritDoc
     */
    protected void initialiseElementSpecificAttributes(
            XDIMEContextInternal context, XDIMEAttributes attributes)
            throws XDIMEException {
        DisplayAttributes displayAttributes = (DisplayAttributes) protocolAttributes;

        String attributeValue = attributes.getValue("", "property");
       
        if (attributeValue != null) {
            displayAttributes.setPropertyReference(new PropertyReferenceImpl(attributeValue));
        }
       
        displayAttributes.setContent(attributes.getValue("", "content"));
       
    }
View Full Code Here

    public void doRenderOpen(VolantisProtocol protocol, MCSAttributes attributes)
            throws ProtocolException {

        WidgetDefaultModule module = getWidgetDefaultModule(protocol);
       
        propertyDisplayAttributes = new DisplayAttributes();
       
        propertyDisplayAttributes.copy(attributes);

        if (propertyDisplayAttributes.getId() == null) {
            propertyDisplayAttributes.setId(protocol.getMarinerPageContext().generateUniqueFCID());
View Full Code Here

        }       
       
        protocol.writeCloseSpan(spanAttributes);

        // Render the Property Display controller.
        DisplayAttributes propertyDisplayAttributes = (DisplayAttributes) attributes;
       
        PropertyReference propertyReference = propertyDisplayAttributes.getPropertyReference();
       
        StringBuffer scriptBuffer = new StringBuffer();
       
        // Finally, render the JavaScript part.
        if (attributes.getId() != null) {
            scriptBuffer.append("Widget.register(")
                .append(createJavaScriptString(attributes.getId()))
                .append(",");
           
            addCreatedWidgetId(attributes.getId());
        }

        scriptBuffer.append("new Widget.Display(")
            .append(createJavaScriptString(spanAttributes.getId()))
            .append(",{");
       
        if (propertyReference != null) {
            scriptBuffer.append("property:")
                .append(createJavaScriptExpression(propertyReference));
           
            addUsedWidgetId(propertyReference.getWidgetId());
        }
       
        String content = propertyDisplayAttributes.getContent();
       
        if (content != null){
            scriptBuffer.append("content:")
            .append(createJavaScriptString(content));
       
View Full Code Here

TOP

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

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.