writer.end();
renderDelegateSuffix(writer, cycle);
// now create widget parms
JSONObject json = new JSONObject();
json.put("inputId", getClientId());
json.put("inputName", getName());
json.put("iconAlt", getIconAlt());
json.put("displayFormat", translator.getPattern(getPage().getLocale()));
json.put("saveFormat", translator.getPattern(getPage().getLocale()));
if (getValue() != null) {
json.put("value", translator.formatRfc3339(getValue()));
}
json.put("disabled", isDisabled());
if (getDisplayWeeks() > 0)
json.put("displayWeeks", getDisplayWeeks());
if (isAdjustWeeks())
json.put("adjustWeeks", isAdjustWeeks());
if (getStartDate() != null)
json.put("startDate", translator.formatRfc3339(getStartDate()));
if (getEndDate() != null)
json.put("endDate", translator.formatRfc3339(getEndDate()));
if (getWeekStartsOn() > -1)
json.put("weekStartsOn", getWeekStartsOn());
if (isStaticDisplay())
json.put("staticDisplay", isStaticDisplay());
Map parms = new HashMap();
parms.put("clientId", getClientId());
parms.put("props", json.toString());
parms.put("widget", this);
getScript().execute(this, cycle, TapestryUtils.getPageRenderSupport(cycle, this), parms);
}