Package org.apache.wicket.markup.html.resources

Examples of org.apache.wicket.markup.html.resources.JavascriptResourceReference


    {
      private static final long serialVersionUID = 1L;

      public void renderHead(IHeaderResponse response)
      {
        response.renderJavascriptReference(new JavascriptResourceReference(scope, path));
      }
    });
  }
View Full Code Here


    {
      private static final long serialVersionUID = 1L;

      public void renderHead(IHeaderResponse response)
      {
        response.renderJavascriptReference(new JavascriptResourceReference(scope, path));
      }
    });
  }
View Full Code Here

    variables.put("datePattern", getDatePattern());
    variables.put("fireChangeEvent", Boolean.valueOf(notifyComponentOnDateSelected()));
    variables.put("alignWithIcon", Boolean.valueOf(alignWithIcon()));
    // variables for YUILoader
    variables.put("pathToWicketDate", RequestCycle.get().urlFor(
        new JavascriptResourceReference(DatePicker.class, "wicket-date.js")));
    variables.put("basePath", RequestCycle.get().urlFor(
        new JavascriptResourceReference(YuiLib.class, "")));
    variables.put("enableMonthYearSelection", Boolean.valueOf(enableMonthYearSelection()));
    variables.put("hideOnSelect", Boolean.valueOf(hideOnSelect()));
    String script = getAdditionalJavascript();
    if (script != null)
    {
View Full Code Here

   *            header response
   */
  // TODO see http://tech.groups.yahoo.com/group/ydn-javascript/message/16209
  public static void load(IHeaderResponse response)
  {
    response.renderJavascriptReference(new JavascriptResourceReference(YuiLib.class,
        "yahoo/yahoo.js"));
    response.renderJavascriptReference(new JavascriptResourceReference(YuiLib.class,
        "yuiloader-beta.js"));
  }
View Full Code Here

    variables.put("datePattern", getDatePattern());
    variables.put("fireChangeEvent", Boolean.valueOf(notifyComponentOnDateSelected()));
    variables.put("alignWithIcon", Boolean.valueOf(alignWithIcon()));
    // variables for YUILoader
    variables.put("pathToWicketDate", RequestCycle.get().urlFor(
        new JavascriptResourceReference(DatePicker.class, "wicket-date.js")));
    variables.put("basePath", RequestCycle.get().urlFor(
        new JavascriptResourceReference(YuiLib.class, "")));
    variables.put("enableMonthYearSelection", Boolean.valueOf(enableMonthYearSelection()));
    variables.put("hideOnSelect", Boolean.valueOf(hideOnSelect()));
    String script = getAdditionalJavascript();
    if (script != null)
    {
View Full Code Here

   */
  public void renderHead(IHeaderResponse response)
  {
    // NOTE JavascriptResourceReference takes care of stripping comments
    // when in deployment (production) mode
    response.renderJavascriptReference(new JavascriptResourceReference(DatePicker.class,
        "dhtmlgoodies_calendar.js"));
    response.renderCSSReference(new CompressedResourceReference(DatePicker.class,
        "dhtmlgoodies_calendar.css"));

    // Set the icons image path
View Full Code Here

          {
            moduleScript = new ResourceReference(YUI.class, path);
          }
          else
          {
            moduleScript = new JavascriptResourceReference(YUI.class, path);
          }
          YuiHeaderContributor.this.moduleCache.put(path, moduleScript);
        }
        response.renderJavascriptReference(moduleScript);
        if (dependencyResolver.hasCssAsset(name, YUI_BUILD_ROOT + "/" + build))
View Full Code Here

    addJavascriptReference(response, "dragdrop.js");
    addJavascriptReference(response, "controls.js");
  }

  private void addJavascriptReference(IHeaderResponse response, String resource) {
    response.renderJavascriptReference(new JavascriptResourceReference(ScriptaculousAjaxBehavior.class, resource));
  }
View Full Code Here

    @Override
    public void renderHead(IHeaderResponse response)
    {
      super.renderHead(response);

      response.renderJavascriptReference(new JavascriptResourceReference(Animator.class,
          "animator.js"));

      Map<String, String> variables = new HashMap<String, String>();
      variables.put("animatorId", animatorId);

      StringBuffer optBuffer = new StringBuffer();
      optBuffer.append("{ ");
      for (String key : options.keySet())
      {
        optBuffer.append(key);
        optBuffer.append(": ");
        optBuffer.append(options.get(key));
        optBuffer.append(", ");
      }
      optBuffer.append(" }");
      variables.put("options", optBuffer.toString());

      StringBuffer init = new StringBuffer();
      for (int i = 0; i < subjects.size(); i++)
      {
        init.append(".addSubject(");
        init.append(((IAnimatorSubject)subjects.get(i)).getJavaScript());
        init.append(")");
      }
      variables.put("addSubjects", init.toString());

      TextTemplateHeaderContributor.forJavaScript(Animator.class, "wicket-animator.js",
          Model.valueOf(variables)).renderHead(response);
      response.renderOnLoadJavascript("init" + animatorId + "();");
      response.renderJavascriptReference(new JavascriptResourceReference(
          AbstractDefaultAjaxBehavior.class, "wicket-ajax.js"));
    }
View Full Code Here

   * @param response
   * @param resource
   */
  private void addJavascriptReference(IHeaderResponse response,
      String resource) {
    response.renderJavascriptReference(new JavascriptResourceReference(
        YavBehavior.class, resource));
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.html.resources.JavascriptResourceReference

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.