Examples of PackageTextTemplate


Examples of org.apache.wicket.util.template.PackageTextTemplate

    {
      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

Examples of org.apache.wicket.util.template.PackageTextTemplate

      @Override
      protected void onSubmit(AjaxRequestTarget target, Form<?> form)
      {

        CharSequence templateHtml = renderTemplate(new PackageTextTemplate(
          MailTemplate.class, "mail-template.tmpl"));
        updateResult(result, templateHtml, target);
        target.add(feedback);
      }
View Full Code Here

Examples of org.apache.wicket.util.template.PackageTextTemplate

    final String contentType, final String encoding,
    IModel<Map<String, Object>> variablesModel, Locale locale, String style, String variation)
  {
    super(scope, fileName, locale, style, variation);

    textTemplate = new PackageTextTemplate(scope, fileName, contentType, encoding);
    this.variablesModel = variablesModel;

    if (Application.exists())
    {
      Application.get().getResourceReferenceRegistry().registerResourceReference(this);
View Full Code Here

Examples of org.apache.wicket.util.template.PackageTextTemplate

      @Override
      protected void onSubmit(AjaxRequestTarget target, Form<?> form)
      {

        CharSequence templateHtml = renderTemplate(new PackageTextTemplate(
          MailTemplate.class, "mail-template.tmpl"));
        updateResult(result, templateHtml, target);
        target.add(feedback);
      }
View Full Code Here

Examples of org.apache.wicket.util.template.PackageTextTemplate

    StringBuilder calendarInit = new StringBuilder();
    appendMapping(p, calendarInit);
    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

Examples of org.apache.wicket.util.template.PackageTextTemplate

    {
      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

Examples of org.apache.wicket.util.template.PackageTextTemplate

                "the same name as the class but with a '.js' extension and be present in " +
                "the same classpath location.",
                this.templateLocation));
        }
       
        TextTemplate tt = new PackageTextTemplate(
            this.template.getScope(),
            this.template.getName(),
            "application/javascript",
            settings().getEncoding()
        );
       
        Map<String,Object> map = new HashMap<String,Object>();
        map.put("component", comp);
        map.put("behavior", this);
       
        this.readyScript = getCompressor().compress(
            PropertyVariableInterpolator.interpolate(tt.getString(), map)
        );
    }
View Full Code Here

Examples of org.apache.wicket.util.template.PackageTextTemplate

  public FullCalendar(final String id, final Config config)
  {
    super(id);
    if (EVENTS == null) {
      EVENTS = new PackageTextTemplate(FullCalendar.class, "FullCalendar.events.tpl");
    }
    this.config = config;
    setVersioned(false);
  }
View Full Code Here

Examples of org.apache.wicket.util.template.PackageTextTemplate

   * @return the jstemplate
   */
  private static PackageTextTemplate getJstemplate()
  {
    if (jsTemplate == null) {
      jsTemplate = new PackageTextTemplate(AbstractUnsecureBasePage.class, "ContextMenu.js.template");
    }
    return jsTemplate;
  }
View Full Code Here

Examples of org.apache.wicket.util.template.PackageTextTemplate

        onColorUpdate(selectedColor);
      }
    });
    colorForm.add(colorField);
    // colorpicker js
    final JavaScriptTemplate jsTemplate = new JavaScriptTemplate(new PackageTextTemplate(ColorPickerPanel.class, "ColorPicker.js.template"));
    final String javaScript = jsTemplate.asString(new MicroMap<String, String>("markupId", colorField.getMarkupId()));
    add(new Label("template", javaScript).setEscapeModelStrings(false));
  }
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.