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

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


        pushElement(new DetailElement(xdimeContext));

        executeTest();

        FoldingItemAttributes parentAttrs = (FoldingItemAttributes)parent.getProtocolAttributes();
        LoadAttributes loadAttrs = parentAttrs.getLoadAttributes();
        assertNotNull(loadAttrs);
        assertEquals(loadAttrs.getId(), getWidgetId());
    }
View Full Code Here


        require(WIDGET_GALLERY, protocol, attributes, true);
    }
   
    private void renderCloseForWidget(VolantisProtocol protocol, ItemsAttributes attributes)
        throws ProtocolException {
        LoadAttributes loadAttributes = attributes.getLoadAttributes();

        // Finally, render the JavaScript part.
        String itemsId = attributes.getId();
       
        if (itemsId == null) {
            itemsId = protocol.getMarinerPageContext().generateFCID("GALLERY_ITEMS");
        }
       
        StringBuffer buffer = new StringBuffer();
       
        buffer.append("Widget.register(")
            .append(createJavaScriptString(itemsId))
            .append(", ")
            .append("Gallery.createItems({");
       
        addCreatedWidgetId(itemsId);

        // There were no items rendered.
        if (loadAttributes != null) {
            // If items are to be loaded, render items as null.
            buffer.append("loadURL:" + createJavaScriptString(loadAttributes.getSrc()));

            if (loadAttributes.getWhen() != null) {
                if (loadAttributes.getWhen().equals("defer")) {
                    buffer.append(",loadOnDemand:true");
                } if (loadAttributes.getWhen().equals("onload")) {
                    buffer.append(",loadOnDemand:false");                       
                }
            }
               
        } else {
View Full Code Here

*/
public class LoadElement extends WidgetElement {

    public LoadElement(XDIMEContextInternal context) {
        super(WidgetElements.LOAD, context);
        protocolAttributes = new LoadAttributes();
    }
View Full Code Here

          StyleValue unfoldon = styles.getPropertyValues().getSpecifiedValue(StylePropertyDetails.MCS_TOGGLE_EVENT);
         
          if (unfoldon != null)
            textBuffer.append("unfoldon: ").append(createJavaScriptString(unfoldon.getStandardCSS())).append(", ");
         
          LoadAttributes loadAttributes = datePickerAttributes.getLoadAttributes();
          if (loadAttributes != null) {
            String load = "load_src: " + createJavaScriptString(loadAttributes.getSrc())
                      + ", load_when: " + createJavaScriptString(loadAttributes.getWhen()) + ", ";
            textBuffer.append(load);
          }         
                   
            textBuffer.append(getDisappearableOptions(attributes))
            .append(", ").append(getAppearableOptions(attributes))
View Full Code Here

       
        if (rowsPerPage instanceof StyleInteger) {
            options.put("rowsPerPage", Integer.toString(((StyleInteger) rowsPerPage).getInteger()));
        }
       
        LoadAttributes loadAttributes = tableBodyAttributes.getLoadAttributes();
       
        if (loadAttributes != null) {

            // require AJAX script module
            require(WidgetScriptModules.BASE_AJAX, protocol, attributes);
           
            HashMap loadOptions = new HashMap();

            loadOptions.put("src", createJavaScriptString(loadAttributes.getSrc()));

            String when = loadAttributes.getWhen();
            loadOptions.put("when", createJavaScriptString(when != null ? when : "onload"));
           
            StringBuffer loadScript = new StringBuffer();
           
            loadScript.append("new Widget.TableBodyLoad(")
View Full Code Here

                       
        DOMOutputBuffer currentBuffer = getCurrentBuffer(protocol);

        String textToScript;
        String textLoadAttr = "";
            LoadAttributes loadAttributes = ((FoldingItemAttributes) attributes)
                    .getLoadAttributes();
            if (loadAttributes != null) {
                textLoadAttr = ", load_src: " + createJavaScriptString(loadAttributes.getSrc())
                        + ", load_when: " + createJavaScriptString(loadAttributes.getWhen());
            }

            Styles styles = attributes.getStyles();
            StyleValue unfoldon = styles.getPropertyValues().getSpecifiedValue(StylePropertyDetails.MCS_TOGGLE_EVENT);
View Full Code Here

       
        String dateTimeFormat =
            getDateTimeFormat(stylesExtractor.getDateTimeFormat(),specialMarks);

       
        LoadAttributes loadAttributes = timerAttributes.getLoadAttributes();
       
        StringBuffer textLoadAttr = new StringBuffer();
        if(loadAttributes != null) {
            textLoadAttr.append(", load_src: ")
            .append(createJavaScriptString(loadAttributes.getSrc()));
        }
       
        StringBuffer startStopAttr = new StringBuffer();
        Integer start = timerAttributes.getStartTime();
        Integer stop = timerAttributes.getStopTime();
View Full Code Here

            .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:")
View Full Code Here

            require(WidgetScriptModules.BASE_BB_LOAD, protocol, attributes);

            if(delimited) {
                buffer.append(",");
            }
            LoadAttributes loadAttrs = ((BlockAttributes)attributes).getLoadAttributes();
            buffer.append("load: new Widget.BlockLoad({src: '");
            buffer.append(loadAttrs.getSrc() + "'");
           
            if(loadAttrs.getWhen() != null) {
                buffer.append(", when: '");
                buffer.append(loadAttrs.getWhen() + "'");               
            }
            buffer.append("})");                       
            delimited = true;
        }
View Full Code Here

TOP

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

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.