List selectedList = getSelectedList();
if (selectedList == null)
throw Tapestry.createRequiredParameterException(this, "selectedList");
IPropertySelectionModel model = getModel();
if (model == null)
throw Tapestry.createRequiredParameterException(this, "model");
IMultiplePropertySelectionRenderer renderer = getRenderer();
// Start rendering
renderer.beginRender(this, writer, cycle);
int count = model.getOptionCount();
for (int i = 0; i < count; i++)
{
Object option = model.getOption(i);
// Try to find the option in the list and if yes, then it is checked.
boolean optionSelected = selectedList.contains(option);
renderer.renderOption(this, writer, cycle, model, option, i, optionSelected);