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

Examples of com.volantis.mcs.protocols.widgets.internal.attributes.JavaScriptArrayAttributes


        // anything.
        if (!isWidgetSupported(protocol)) {
            return;
        }

        JavaScriptArrayAttributes listAttributes = (JavaScriptArrayAttributes) attributes;
       
        StringBuffer buffer = new StringBuffer();
       
        if (attributes.getId() != null) {
            buffer.append(createJavaScriptWidgetRegistrationOpening(attributes.getId()));
           
            addCreatedWidgetId(attributes.getId());
        }
       
        buffer.append("[");
       
        Iterator iterator = listAttributes.getWidgets().iterator();
       
        while (iterator.hasNext()) {
            String widgetId = (String) iterator.next();
           
            buffer.append(createJavaScriptWidgetReference(widgetId));
View Full Code Here


        if (attributes.getId() == null) {
            attributes.setId(protocol.getMarinerPageContext().generateUniqueFCID());
        }
       
        listAttributes = new JavaScriptArrayAttributes();
       
        listAttributes.setId(protocol.getMarinerPageContext().generateUniqueFCID());
       
        renderWidgetOpen(protocol, listAttributes);
    }
View Full Code Here

            return;
        }

        require(MODULE, protocol, attributes);

        JavaScriptArrayAttributes listAttributes = new JavaScriptArrayAttributes();
       
        listAttributes.setId(protocol.getMarinerPageContext().generateUniqueFCID());
       
        renderWidgetOpen(protocol, listAttributes);
    }
View Full Code Here

        // require AJAX script module
        if ( ((DeckAttributes)attributes).getLoadAttributes() != null ) {
            require(WidgetScriptModules.BASE_AJAX, protocol, attributes);
        }
       
        JavaScriptArrayAttributes listAttributes = (JavaScriptArrayAttributes) getCurrentAttributes(protocol);
       
        renderWidgetClose(protocol, listAttributes);
       
        BlockContainerAttributes blockContainerAttributes = new BlockContainerAttributes();
       
        blockContainerAttributes.copy(attributes);
       
        blockContainerAttributes.setId(protocol.getMarinerPageContext().generateUniqueFCID());
       
        renderWidgetOpen(protocol, blockContainerAttributes);
       
        renderWidgetClose(protocol, blockContainerAttributes);
       
        DeckAttributes deckAttributes = (DeckAttributes) attributes;

        // Prepare Javascript content.
        StringBuffer buffer = new StringBuffer();
       
        if (attributes.getId() != null) {
            buffer.append(createJavaScriptWidgetRegistrationOpening(attributes.getId()));

            addCreatedWidgetId(attributes.getId());
        }
       
        buffer.append("new Widget.Deck(")
            .append(createJavaScriptWidgetReference(blockContainerAttributes.getId()))
            .append(",{");
       
        // Render display mode.
        buffer.append("mode:")
            .append(createJavaScriptString(deckAttributes.getStyles()
                    .getPropertyValues().getComputedValue(StylePropertyDetails.MCS_DECK_MODE)
                    .getStandardCSS()));

        // Render deck pages: loaded or embeeded in static way
        LoadAttributes loadAttributes = deckAttributes.getLoadAttributes();
       
        if (loadAttributes != null) {
            String when = loadAttributes.getWhen();
            if (when == null) when = "onload";
           
            buffer.append(",load: new Widget.DeckLoad({src:")
                .append(createJavaScriptString(loadAttributes.getSrc()))
                .append(",when:")
                .append(createJavaScriptString(when))
                .append("})");                       
        } else {
            buffer.append(",pages:")
                .append(createJavaScriptWidgetReference(listAttributes.getId()));
        }
       
        buffer.append("})");
       
        addUsedWidgetId(blockContainerAttributes.getId());

        addUsedWidgetId(listAttributes.getId());
       
        if (attributes.getId() != null) {
            buffer.append(createJavaScriptWidgetRegistrationClosure());
        }
       
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.widgets.internal.attributes.JavaScriptArrayAttributes

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.