Package org.apache.ecs.html

Examples of org.apache.ecs.html.Script


     * @param url A String.
     * @return A TemplatePageAttributesEx (self).
     */
    public TemplatePageAttributes setScript(String url)
    {
        data.getPage().getHead().addElement(new Script().setSrc(url)
                .setType("text/javascript").setLanguage("JavaScript"));
        return this;
    }
View Full Code Here


        this.labels = labels;

        // ------------------------------
        // Create some scripts in advance
        // ------------------------------
        dynApiScript = new Script().setType("text/javascript").setLanguage("JavaScript1.2").setSrc(
            dynApiRoot + "src/dynapi.js");

        dynApiIncludeScript = new Script().setLanguage("JavaScript1.2").addElement(
            "DynAPI.setLibraryPath('" + dynApiRoot + "src/lib/');\n"
                    + "DynAPI.include('dynapi.api.*');\n" + "DynAPI.include('dynapi.event.*');\n"
                    + "DynAPI.include(\"smilemenu.js\", \"" + smileMenuRoot + "\")\n");
    }
View Full Code Here

        // ---------------------------
        // Add the scripts to the head
        // ---------------------------
        head.addElement(dynApiScript).addElement(dynApiIncludeScript).addElement(
            new Script().setLanguage("JavaScript1.2").addElement(menuScript).addElement(
                "\nDynAPI.onLoad = function() { createMenus(); };\n"));

        return null;
        //getMenuBar(menus, rights, lang);
    }
View Full Code Here

            res.setContentType(environment.getContentType());
            out = res.getWriter();
            pers = new Persister(database);
            LabelResource labels = environment.getLabelResource(session);

            Script script = null;
            String scriptString = getScript(labels);
            if(scriptString != null)
                script = new Script()
                    .setLanguage("JavaScript")
                    .setType("text/javascript")
                    .addElement(scriptString);

            String content = handleRequest(req, session, parameters, pers, labels, requestType);

            environment.outputPage(getTabSetId(), getTabId(), content, script != null ? script
                .toString() : null, out, session);
           
        } catch(Throwable e) {
            environment.outputErrorPage(e, out);
        } finally {
View Full Code Here

       
        // We use setTimeout to prevent browser's rendering from stopping before
        // the full page is rendered
        String errorString = "setTimeout(\"alert('" + errorText + "');\",1);";
       
        Script script = new Script()
        .setLanguage("JavaScript")
        .setType("text/javascript")
        .addElement(errorString);

        return script.toString();
    }
View Full Code Here

                .addElement("Your browser can't handle frames. Please update your browser!"));

            Document document = new Document().setDoctype(new Doctype.Html40Frameset()).setHtml(
                new Html().addElement(
                    new Head().addElement(new Title("Smilehouse OpenSyncro (Standalone)"))
                    .addElement(new Script(
                        "if (top.location != location) top.location.href = document.location.href;")
                        .setLanguage("JavaScript")
                        )).addElement(
                    frameset).addElement(noframes));
           
View Full Code Here

        // --------------
        // Message pop up
        // --------------
        if(message != null) {
            body.addElement(new Script().setLanguage("JavaScript").addElement(
                "alert('" + message + "')"));
        }

        Document document = new Document().setDoctype(new Doctype.Html40Transitional()).setHtml(
            new Html()
View Full Code Here

     * @param url A String.
     * @return A TemplatePageAttributesEx (self).
     */
    public TemplatePageAttributes setScript(String url)
    {
        data.getPage().getHead().addElement(new Script().setSrc(url)
                .setType("text/javascript").setLanguage("JavaScript"));
        return this;
    }
View Full Code Here

        {
            Date dt = new Date(System.currentTimeMillis());
            value = new SimpleDateFormat("M/d/yyyy").format(dt);
        }

        container.addElement(new Script().setLanguage("JavaScript").setSrc("javascript/PopupCalendar.js"));

        container.addElement(new Input(Input.TEXT, name, value));

        IMG img = new IMG("images/cal.gif").setAlt("Click here for popup calendar").setBorder(0);
        A a = new A(this.getJavaScript(name), img);
View Full Code Here

        {
            Date dt = new Date(System.currentTimeMillis());
            value = new SimpleDateFormat("M/d/yyyy").format(dt);
        }

        container.addElement(new Script().setLanguage("JavaScript").setSrc("javascript/PopupCalendar.js"));

        container.addElement(new Input(Input.TEXT, name, value));

        IMG img = new IMG("images/cal.gif").setAlt("Click here for popup calendar").setBorder(0);
        A a = new A(this.getJavaScript(name), img);
View Full Code Here

TOP

Related Classes of org.apache.ecs.html.Script

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.