final Element checkbox = writer.element("input", "type", "checkbox", "id", clientId, "name", getControlName(), "value", clientValue);
if (getSelected().contains(model.getValue()))
{
checkbox.attribute("checked", "checked");
}
writer.end();
writer.element("label", "for", clientId);
writer.write(model.getLabel());