Package org.apache.tapestry5.services.javascript

Examples of org.apache.tapestry5.services.javascript.StylesheetLink


        DocumentLinkerImpl linker = new DocumentLinkerImpl(true, "1.2.3", true);

        // Only checked if there's something to link.

        linker.addStylesheetLink(new StylesheetLink("style.css"));

        replay();

        linker.updateDocument(document);
View Full Code Here


        document.newRootElement("html");

        DocumentLinkerImpl linker = new DocumentLinkerImpl(true, "1.2.3", true);

        linker.addStylesheetLink(new StylesheetLink("style.css", new StylesheetOptions("print")));
        linker.addScriptLink("foo.js");
        linker.addScriptLink("bar/baz.js");
        linker.addScript(InitializationPriority.IMMEDIATE, "pageInitialization();");

        linker.updateDocument(document);
View Full Code Here

    private JavaScriptSupport javascriptSupport;

    @Import(stylesheet = "context:css/via-import.css")
    void afterRender()
    {
        javascriptSupport.importStylesheet(new StylesheetLink(ieOnly, new StylesheetOptions(null, "IE")));
    }
View Full Code Here

        {
            public void renderMarkup(MarkupWriter writer, MarkupRenderer renderer)
            {
                DocumentLinker linker = environment.peekRequired(DocumentLinker.class);

                linker.addStylesheetLink(new StylesheetLink(defaultStylesheet.toClientURL()));

                renderer.renderMarkup(writer);
            }
        };
View Full Code Here

        return zoneWithEmptyBody.getBody();
    }
   
    void afterRender()
    {
        jss.importStylesheet(new StylesheetLink(overridesCSS, new StylesheetOptions().asAjaxInsertionPoint()));
    }
View Full Code Here

    private Asset logo;

    @Import(stylesheet = "context:css/via-import.css")
    void afterRender()
    {
        javascriptSupport.importStylesheet(new StylesheetLink(ieOnly, new StylesheetOptions(null, "IE")));
    }
View Full Code Here

    }

    public void importStylesheet(Asset stylesheet)
    {
        assert stylesheet != null;
        importStylesheet(new StylesheetLink(stylesheet));
    }
View Full Code Here

    private void trainForCoreStack(DocumentLinker linker, JavaScriptStackSource stackSource,
            JavaScriptStackPathConstructor pathConstructor)
    {
        JavaScriptStack stack = mockJavaScriptStack();

        StylesheetLink stylesheetLink = new StylesheetLink("style.css");

        expect(stackSource.getStack(InternalConstants.CORE_STACK_NAME)).andReturn(stack);
        expect(pathConstructor.constructPathsForJavaScriptStack(InternalConstants.CORE_STACK_NAME)).andReturn(
                CollectionFactory.newList("stack1.js", "stack2.js"));
        expect(stack.getStylesheets()).andReturn(CollectionFactory.newList(stylesheetLink));
View Full Code Here

        trainForCoreStack(linker, stackSource, pathConstructor);

        JavaScriptStack stack = mockJavaScriptStack();

        StylesheetLink stylesheetLink = new StylesheetLink("stack.css");

        expect(stackSource.getStack("custom")).andReturn(stack);
        expect(pathConstructor.constructPathsForJavaScriptStack("custom")).andReturn(
                CollectionFactory.newList("stack.js"));
        expect(stack.getStylesheets()).andReturn(CollectionFactory.newList(stylesheetLink));
View Full Code Here

        trainForCoreStack(linker, stackSource, pathConstructor);

        JavaScriptStack child = mockJavaScriptStack();
        JavaScriptStack parent = mockJavaScriptStack();

        StylesheetLink parentStylesheetLink = new StylesheetLink("parent.css");

        StylesheetLink childStylesheetLink = new StylesheetLink("child.css");

        expect(stackSource.getStack("child")).andReturn(child);

        expect(child.getStacks()).andReturn(Arrays.asList("parent"));
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.services.javascript.StylesheetLink

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.