"name", getControlName());
for(Object object: getSelected())
{
OptionModel model = valueToOptionModel.get(object);
writer.element("Option",
"value",model.getValue(),
"selected", "selected");
writer.write(model.getLabel());
writer.end();
}
writer.end();
String script = "new Tapestry.DgDpPalette('%s', %s)";
JSONArray array = new JSONArray();
for(OptionModel option : model.getOptions())
{
array.put(option.getValue() + "-" + getClientId() + "-option");
}
javascriptSupport.addScript(script,clientId, array);