Examples of DojoModule


Examples of org.directwebremoting.servlet.DojoModule

     * @see org.directwebremoting.servlet.FileJavaScriptHandler#generateTemplate(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     */
    @Override
    protected String generateTemplate(String contextPath, String servletPath, String pathInfo) throws IOException
    {
        DojoModule mod = new DojoModule(contextPath, servletPath, dojoDwrBaseModulePath, "util");

        // Capture the DWR namespace if not mapped to standard "dwr" path
        boolean remap = !dojoDwrBaseModulePath.equals("dwr");
        if (remap)
        {
            mod.addContent("(function(dwr) {\n");
            mod.addContent("\n");
        }

        // Add standard util.js contents
        mod.addContent(super.generateTemplate(contextPath, servletPath, pathInfo));

        // Close the capturing closure
        if (remap)
        {
            mod.addContent("\n");
            mod.addContent("})(" + mod.expandModulePath(dojoDwrBaseModulePath) + ");\n");
        }

        return mod.toString();
    }
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.