Package com.volantis.mcs.protocols.ticker.attributes

Examples of com.volantis.mcs.protocols.ticker.attributes.ItemDisplayAttributes


        if(!isWidgetSupported(protocol)) {
            return;
        }               

        ItemDisplayAttributes itemDisplayAttributes = (ItemDisplayAttributes) attributes;
        
        // Render popup closure.
        getWidgetDefaultModule(protocol).getPopupRenderer().renderClose(protocol, popupAttributes);

        // Prepare Javascript content.
        StringWriter scriptWriter = new StringWriter();
       
        // Finally, render the JavaScript part.
        if (itemDisplayAttributes.getId() != null) {
            scriptWriter.write(createJavaScriptWidgetRegistrationOpening(itemDisplayAttributes.getId()));
           
            addCreatedWidgetId(itemDisplayAttributes.getId());
        }
       
        scriptWriter.write("Ticker.createItemDisplay({");     
       
        scriptWriter.write("popupId:" + createJavaScriptString(popupAttributes.getId()));
       
        addUsedWidgetId(popupAttributes.getId());
       
        StringWriter propertyIdWriter = new StringWriter();
       
        Iterator itemPropertyIterator = itemDisplayAttributes.getItemProperties().iterator();
       
        boolean firstItemProperty = true;
       
        while (itemPropertyIterator.hasNext()) {
            ItemPropertyAttributes itemPropertyAttributes =
                    (ItemPropertyAttributes) itemPropertyIterator.next();
           
            if (firstItemProperty) {
                firstItemProperty = false;
            } else {
                propertyIdWriter.write(",");
            }
           
            propertyIdWriter.write(itemPropertyAttributes.getId());
        }
       
        scriptWriter.write(",itemPropertyId:" + createJavaScriptString(propertyIdWriter.toString()));
       
        scriptWriter.write("})");

        if (itemDisplayAttributes.getId() != null) {
            scriptWriter.write(createJavaScriptWidgetRegistrationClosure());                 
        }
       
        // Write JavaScript content to DOM.
        writeJavaScript(scriptWriter.toString());
View Full Code Here


     * @param context
     */
    public ItemDisplayElement(XDIMEContextInternal context) {
        super(TickerElements.ITEM_DISPLAY, context);
       
        protocolAttributes = new ItemDisplayAttributes();       
   
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.ticker.attributes.ItemDisplayAttributes

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.