Package org.apache.wicket.util.template

Examples of org.apache.wicket.util.template.PackagedTextTemplate$CachedTextTemplateKey


  public void setSlot(YuiImage slot) {
    this.slot = slot;
  }

  protected String getDragDropPlayerInitializationScript(String playerId) {
    PackagedTextTemplate template = new PackagedTextTemplate(
        DragDropPlayer.class, "dragdropPlayer.js");
    Map<String, Object> variables = new HashMap<String, Object>(4);
    variables.put("javaScriptId", javaScriptId);
    variables.put("id", playerId);
    variables.put("dragableSlot", settings.getDragableSlotList().getId());
    variables.put("targetSlot", settings.getTargetSlotList().getId());
    template.interpolate(variables);
    return template.getString();
  }
View Full Code Here


      } else {
        sortValues = sortValues + ", '" + yuiImage.getDesc() + "'";
        sortIds = sortIds + ", 'dd" + i + "_" + id + "'";
      }
    }
    PackagedTextTemplate template = new PackagedTextTemplate(
        SortGroup.class, "init.js");
    Map<String, Object> variables = new HashMap<String, Object>(4);
    variables.put("javaScriptId", javaScriptId);
    variables.put("mode", "YAHOO.util.DDM." + mode);
    variables.put("sortValues", sortValues);
    variables.put("sortIds", sortIds);
    variables.put("valueId", "'" + valueId + "'");
    template.interpolate(variables);
    return template.getString();
  }
View Full Code Here

  protected void onBeforeRender() {
    super.onBeforeRender();
    javaScriptId = getMarkupId();

    TextTemplate template = new PackagedTextTemplate(
            DragDropGroup.class, "init.js");
   
    add(TextTemplateHeaderContributor.forJavaScript(template, new AbstractReadOnlyModel(){

            @Override
View Full Code Here

    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 PackagedTextTemplate(scope, fileName, contentType, encoding);
    this.variablesModel = variablesModel;
  }
View Full Code Here

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

    // render initialization script with the variables interpolated
    TextTemplate datePickerJs = new PackagedTextTemplate(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("calendarInit", calendarInit.toString());

    // render initialization script with the variables interpolated
    TextTemplate datePickerJs = new PackagedTextTemplate(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

TOP

Related Classes of org.apache.wicket.util.template.PackagedTextTemplate$CachedTextTemplateKey

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.