template.interpolate(variables);
return template.getString();
}
protected String getSelectionInitializationScript() {
PackagedTextTemplate template = null;
if (maxSelection == 1) {
template = new PackagedTextTemplate(Selection.class, "single.js");
} else if (maxSelection > 1) {
template = new PackagedTextTemplate(Selection.class, "multiple.js");
}
Map<String, Object> variables = new HashMap<String, Object>(10);
variables.put("javaScriptId", javaScriptId);
variables.put("attributeOn", yuiAttribute.getJsScript());
variables.put("attributeOff", yuiAttribute.getReverseJsScript());
variables.put("easing", easing);
variables.put("maxSelection", new Integer(maxSelection));
variables.put("duration", new Double(duration));
variables.put("event", "'" + event + "'");
variables.put("boxes", boxes);
variables.put("counts", counts);
variables.put("message", message);
template.interpolate(variables);
return template.getString();
}