Examples of JavaScript


Examples of org.tamacat.util.JavaScript_test.JavaScript

  }

  @Test
  public void testEvalJavaScript() throws ScriptException {
    Method method = ClassUtils.getMethod(JavaScriptUtilsTest.class, "execute", (Class<?>[]) null);
    JavaScript script = method.getAnnotation(JavaScript.class);
    assertNull(JavaScriptUtils.getScriptEngine().eval(script.value()));
  }
View Full Code Here

Examples of org.zkoss.web.servlet.JavaScript

   * @since 5.0.4
   */
  public void removeJavaScript(String src) {
    final Object[] ary = _js.toArray();
    for (int j = 0; j < ary.length; ++j) {
      final JavaScript js = (JavaScript)ary[j];
      if (Objects.equals(src, js.getSrc())) {
        _js.remove(js);
        return; //found
      }
    }
  }
View Full Code Here

Examples of org.zkoss.web.servlet.JavaScript

          pkg = null;
        }
      }

      final String ctn = el.getText(true);
      final JavaScript js;
      if (pkg != null && pkg.length() > 0) {
        if (ondemand) {
          langdef.removeJavaScript("~." + device.packageToPath(pkg));
          langdef.removeMergeJavaScriptPackage(pkg);
        } else {
          langdef.addMergeJavaScriptPackage(pkg);
        }
        continue; //TODO
      } else if (src != null && src.length() > 0) {
        if (ctn != null && ctn.length() > 0)
          throw new UiException("You cannot specify the content if the src attribute is specified, "+el.getLocator());
        final String charset = el.getAttributeValue("charset");
        js = new JavaScript(src, charset);
      } else if (ctn != null && ctn.length() > 0) {
        js = new JavaScript(ctn);
      } else {
        log.warning("Ignored: none of the src or package attribute, or the content specified, "+el.getLocator());
        continue;
      }
      langdef.addJavaScript(js);
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.