List<ValueLabel> valueLabels = new ArrayList<ValueLabel>();
if (optionLabels == null)
{
for (String option : options)
valueLabels.add(new ValueLabel(option, option));
}
else
{
if (options.size() != optionLabels.size()) throw new HtmlInputException(
"List(options) and List(option_labels) should be of same size");
for (int i = 0; i < options.size(); i++)
{
valueLabels.add(new ValueLabel(options.get(i), optionLabels.get(i)));
}
}
this.options = valueLabels;
}