Examples of JsScript


Examples of org.apache.click.element.JsScript

                    // Remove Click's version indicator from src attribute
                    removeVersionIndicator(jsImport, "src");
                    add(jsImport);

                } else {
                    JsScript jsScript = asJsScript(lines[i]);
                    setUnique(jsScript, jsScript.getContent().toString());
                    add(jsScript);

                }
            } else {
                throw new IllegalArgumentException("Unknown include type: " + lines[i]);
View Full Code Here

Examples of org.apache.click.element.JsScript

            buffer.append('\n');
        }

        // Then include all the scripts e.g. <script>...</script>
        for (Iterator it = jsScripts.iterator(); it.hasNext();) {
            JsScript jsScript = (JsScript) it.next();
            jsScript.render(buffer);
            buffer.append('\n');
        }
    }
View Full Code Here

Examples of org.apache.click.element.JsScript

     *
     * @param line the HTML import line to convert to a JavaScript instance
     * @return a Javascript instance
     */
    private JsScript asJsScript(String line) {
        JsScript jsScript = new JsScript();
        copyAttributes(jsScript, line);
        jsScript.setContent(extractJsContent(line, jsScript));
        return jsScript;
    }
View Full Code Here

Examples of org.apache.click.element.JsScript

        // Setup showBorders checkbox Javascript using a JsScript HEAD element

        // First create a JsScript instance for the JavaScript template
        // '/form-head.htm'
        JsScript jsScript = new JsScript("/form-head.htm", new HashMap());

        // Then add a JsScript element to the Page HEAD elements
        getHeadElements().add(jsScript);
    }
View Full Code Here

Examples of org.apache.click.element.JsScript

            // Add the ID of a target element in the Page template to replace
            // with new data, in this example the target is 'customerDetails'
            model.put("target", "customerDetails");

            // Include the ajax-select.js template
            headElements.add(new JsScript("/ajax/ajax-select.js", model));
        }

        return headElements;
    }
View Full Code Here

Examples of org.apache.click.element.JsScript

        if (headElements == null) {
            headElements = super.getHeadElements();

            headElements.add(new CssImport("/assets/css/imports.css"));
            headElements.add(new JsImport("/assets/js/imports.js"));
            headElements.add(new JsScript("addLoadEvent(function() { initMenu(); });"));
        }
        return headElements;
    }
View Full Code Here

Examples of org.apache.click.element.JsScript

            jsModel.put("linkId", '#' + link.getId());

            String content =
                context.renderTemplate("/general/page-head-demo.js", jsModel);

            headElements.add(new JsScript(content));
        }
        return headElements;
    }
View Full Code Here

Examples of org.apache.click.element.JsScript

            Map model = ClickUtils.createTemplateModel(this, getContext());
            model.put("pageSize", pageSize);

            // Note the actual JavaScript necessary to setup the dynamic scrolling
            // is specified in the Page JavaScript template: ajax-live-scroller.js.
            headElements.add(new JsScript("/ajax/ajax-live-scroller.js", model));
        }
        return headElements;
    }
View Full Code Here

Examples of org.apache.click.element.JsScript

            // Add the ID of a target element in the Page template to replace
            // with new data, in this example the target is 'customerDetails'
            model.put("target", "customerDetails");

            // Include the Page associated JavaScript template
            headElements.add(new JsScript("/ajax/ajax-select.js", model));
        }

        return headElements;
    }
View Full Code Here

Examples of org.apache.click.element.JsScript

            headElements.add(new JsImport("/assets/js/jquery.tools.min.js"));
            headElements.add(new CssImport("/assets/css/tabs-accordion.css"));

            // Note the actual JavaScript necessary to setup the accordion is
            // specified in the Page JavaScript template -> ajax-accordion.js.
            headElements.add(new JsScript("/ajax/ajax-accordion.js", new HashMap()));

            // Alternatively, the JsScript below could be used to add
            // the necessary JavaScript to setup the accordion, for example:
            /* String content =
                "$(document).ready(function() {"
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.