/** * Loads a JavaScript file to client and execute it. * * @param url * the URL of the JavasScript file, it will be encoded with * {@link Encodes#encodeURL(javax.servlet.ServletContext, javax.servlet.ServletRequest, javax.servlet.ServletResponse, String)}. * @param callback a callback script to execute when the JavaScript file has loaded. * @param once true means the url will be cached and executed only once. */ public AuLoadScript(String url, String callback, boolean once) { super("loadScript", new Object[] { Executions.encodeURL(url), callback, once }); } }
/** * Loads a CSS file. * @param href the URL of the CSS file, it will be encoded with * {@link Encodes#encodeURL(javax.servlet.ServletContext, javax.servlet.ServletRequest, javax.servlet.ServletResponse, String)}. * @param id the identifier. Ignored if not specified * @param media the media attribute. Ignored if not specified. */ public AuLoadCSS(String href, String id, String media) { super("loadCSS", new String[] { Executions.encodeURL(href), id, media }); }
val = ""; else if ("href".equals(nm) || ((bScript || bStyle) && "src".equals(nm))) val = Executions.encodeURL(val);
for (Map.Entry<String, String> entry : info.entrySet()) { if ("href".equals(entry.getKey())) HTMLs.appendAttribute(sb, entry.getKey(), Executions.encodeURL(entry.getValue()), true); else HTMLs.appendAttribute(sb, entry.getKey(), entry.getValue(), true);
sb.append("<script type=\"text/javascript\""); if (src != null && src.length() != 0) sb.append(" src=\"").append(Executions.encodeURL(src)).append("\" charset=\"UTF-8\">"); else sb.append(">").append(scriptInfo.getY());