Package org.apache.wicket.util.template

Examples of org.apache.wicket.util.template.PackageTextTemplate.asString()


        variables.put("componentMarkupId", component.getMarkupId());
        variables.put("url", component.urlFor(new FileUploadResourceReference(WicketApplication.BASE_FOLDER), null));
        variables.put("paramName", PARAM_NAME);

        String s = jsTmpl.asString(variables);
        response.render(JavaScriptHeaderItem.forScript(s, "fileupload"));
    }
}
View Full Code Here


    else
    {
      variables.put("filterPrefix", component.getRequest().getFilterPath());
    }

    String webSocketSetupScript = webSocketSetupTemplate.asString(variables);

    response.render(OnDomReadyHeaderItem.forScript(webSocketSetupScript));
  }

  @Override
View Full Code Here

    variables.put("calendarInit", calendarInit.toString());

    // render initialization script with the variables interpolated
    TextTemplate datePickerJs = new PackageTextTemplate(DatePicker.class, "DatePicker.js");
    datePickerJs.interpolate(variables);
    response.renderOnDomReadyJavaScript(datePickerJs.asString());

    // remove previously generated markup (see onRendered) via javascript in
    // ajax requests to not render the yui calendar multiple times
    if (AjaxRequestTarget.get() != null)
    {
View Full Code Here

      variables.put("filter", "");
      variables.put("allowRollup", true);
    }

    TextTemplate template = new PackageTextTemplate(DatePicker.class, key);
    response.renderOnDomReadyJavaScript(template.asString(variables));

    response.markRendered(key);
  }

  /**
 
View Full Code Here

    variables.put("calendarInit", calendarInit.toString());

    // render initialization script with the variables interpolated
    TextTemplate datePickerJs = new PackageTextTemplate(DatePicker.class, "DatePicker.js");
    datePickerJs.interpolate(variables);
    response.render(OnDomReadyHeaderItem.forScript(datePickerJs.asString()));

    // remove previously generated markup (see onRendered) via javascript in
    // ajax requests to not render the yui calendar multiple times
    AjaxRequestTarget target = component.getRequestCycle().find(AjaxRequestTarget.class);
    if (target != null)
View Full Code Here

      variables.put("filter", "");
      variables.put("allowRollup", true);
    }

    TextTemplate template = new PackageTextTemplate(DatePicker.class, key);
    response.render(OnDomReadyHeaderItem.forScript(template.asString(variables)));

    response.markRendered(key);
  }

  /**
 
View Full Code Here

    variables.put("calendarInit", calendarInit.toString());

    // render initialization script with the variables interpolated
    TextTemplate datePickerJs = new PackageTextTemplate(DatePicker.class, "DatePicker.js");
    datePickerJs.interpolate(variables);
    response.render(OnDomReadyHeaderItem.forScript(datePickerJs.asString()));

    // remove previously generated markup (see onRendered) via javascript in
    // ajax requests to not render the yui calendar multiple times
    AjaxRequestTarget target = component.getRequestCycle().find(AjaxRequestTarget.class);
    if (target != null)
View Full Code Here

      variables.put("filter", "");
      variables.put("allowRollup", true);
    }

    TextTemplate template = new PackageTextTemplate(DatePicker.class, key);
    response.render(OnDomReadyHeaderItem.forScript(template.asString(variables)));

    response.markRendered(key);
  }

  /**
 
View Full Code Here

    PackageTextTemplate blogJs = new PackageTextTemplate(HandlebarsButton.class, "HandlebarsButton.js.tmpl");
    Map<String, Object> variables = Generics.newHashMap();
    variables.put("templateId", templateId);
    variables.put("targetSelector", targetSelector);
    this.onSuccessFunction = new JsonFunction(blogJs.asString(variables));
  }

  @Override
  protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
  {
View Full Code Here

    variables.put("baseUrl", ajaxBaseUrl);

    String contextPath = component.getRequest().getContextPath();
    variables.put("contextPath", contextPath);

    String webSocketSetupScript = webSocketSetupTemplate.asString(variables);

    response.render(OnDomReadyHeaderItem.forScript(webSocketSetupScript));
  }

  @Override
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.