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

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


        LocalizationFactory.createExceptionLocalizer(FetchElement.class);   
   
   
    public FetchElement(XDIMEContextInternal context) {
        super(WidgetElements.FETCH, context);
        protocolAttributes = new FetchAttributes();
    }
View Full Code Here


        if(((BlockAttributes)attributes).getFetchAttributes() != null) {

            require(WidgetScriptModules.BASE_BB_FETCH, protocol, attributes);
           
            // render javascript constructor
            FetchAttributes fetchAttrs = ((BlockAttributes)attributes).getFetchAttributes();
            buffer.append("fetch: new Widget.BlockFetch({src: '");
            buffer.append(fetchAttrs.getSrc() + "'");
           
            // add localization of installed MCS
            buffer.append(", pageBase : '/").append(protocol.getMarinerPageContext()
                    .getVolantisBean().getPageBase()).append("'");
           
            if(fetchAttrs.getTransformation() != null) {
                buffer.append(", transformation: '");
               
                MarinerPageContext pageContext = protocol.getMarinerPageContext();               
                // get MarinerURL to page with xsl               
                MarinerURL marinerURL = pageContext.getRequestURL(true);
                URI path = null;
                try {
                    path = new URI(marinerURL.getExternalForm());
                } catch (URISyntaxException e) {
                    throw new IllegalStateException("URI to xsl transformation template is invalid");
                }               
               
                URI fullPath = path.resolve(fetchAttrs.getTransformation());                                               
                buffer.append(fullPath.toString() + "'");                                 
            }

            if(fetchAttrs.getService() != null) {
                buffer.append(", service: '");
                buffer.append(fetchAttrs.getService() + "'");               
            }                      
           
            if(fetchAttrs.getWhen() != null) {
                buffer.append(", when: '");
                buffer.append(fetchAttrs.getWhen() + "'");               
            }

            if(fetchAttrs.getTransformCache() != null) {
                buffer.append(", transformCache: '");
                buffer.append(fetchAttrs.getTransformCache() + "'");               
            }

            if(fetchAttrs.getTransformCompile() != null) {
                buffer.append(", transformCompile: '");
                buffer.append(fetchAttrs.getTransformCompile() + "'");               
            }
           
            buffer.append("})");           
            delimited = true;
        }
View Full Code Here

TOP

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

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.