Package org.apache.tapestry5.dom

Examples of org.apache.tapestry5.dom.Element.raw()


            if (developmentMode)
                e.raw("Tapestry.DEBUG_ENABLED = true;\n");

            e.raw("Tapestry.onDOMLoaded(function() {\n");

            e.raw(scriptBlock.toString());

            e.raw("});\n");
        }
    }
View Full Code Here


            e.raw("Tapestry.onDOMLoaded(function() {\n");

            e.raw(scriptBlock.toString());

            e.raw("});\n");
        }
    }

    /**
     * Adds a script link for each included script to the bottom of the container (the <head> or <body> of
View Full Code Here

            // This adds a mask element to the page, based on the Bootstrap modal dialog backdrop. The mark
            // is present immediately, but fades in visually after a short delay, and is removed
            // after page initialization is complete. For a client that doesn't have JavaScript enabled,
            // this will do nothing (though I suspect the page will not behave to expectations!).
            Element script = body.element("script", "type", "text/javascript");
            script.raw("document.write(\"<div class=\\\"pageloading-mask\\\"><div></div></div>\");");

            script.moveToTop(body);
        }

        moduleManager.writeConfiguration(body, moduleConfigurationCallbacks);
View Full Code Here

        Element element = body.element("script", "type", "text/javascript");

        // Build it each time because we don't know if the client supports GZip or not, and
        // (in development mode) URLs for some referenced assets could change (due to URLs
        // containing a checksum on the resource content).
        element.raw(buildRequireJSConfig(callbacks));
    }

    public void writeInitialization(Element body, List<String> libraryURLs, List<?> inits)
    {
View Full Code Here

    public void writeInitialization(Element body, List<String> libraryURLs, List<?> inits)
    {

        Element element = body.element("script", "type", "text/javascript");

        element.raw(globalMessages.format("private-core-page-initialization-template",
                convert(libraryURLs),
                convert(inits)));
    }

    private String convert(List<?> input)
View Full Code Here

        Element head = writer.getDocument().find("html/head");

        // Only add the respective style documents if we've rendered an HTML document
        if (head != null)
        {
            head.raw(ie9);
            head.raw(ie8);
        }
    }
}
View Full Code Here

        // Only add the respective style documents if we've rendered an HTML document
        if (head != null)
        {
            head.raw(ie9);
            head.raw(ie8);
        }
    }
}
View Full Code Here

        if (wrapped)
            block.append("});\n");

        Element e = body.element("script", "type", "text/javascript");

        e.raw(block.toString());

    }

    private void add(StringBuilder block, InitializationPriority priority)
    {
View Full Code Here

        if (blockNeeded)
        {
            Element e = body.element("script");
            if (developmentMode)
                e.raw("Tapestry.DEBUG_ENABLED = true;\n");

            e.raw("Tapestry.onDOMLoaded(function() {\n");

            e.raw(scriptBlock.toString());
View Full Code Here

        {
            Element e = body.element("script");
            if (developmentMode)
                e.raw("Tapestry.DEBUG_ENABLED = true;\n");

            e.raw("Tapestry.onDOMLoaded(function() {\n");

            e.raw(scriptBlock.toString());

            e.raw("});\n");
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.