Widget widget;
//create option widget if parameter options given:
if (param.hasOptions()) {
Option [] options = param.getOptions();
OptionWidget optWidget = new ComboBoxWidget();
for (int i=0; i<options.length; i++)
optWidget.addOption(options[i].getDisplayText(), options[i].getValue());
widget = optWidget;
}
//create based on DataType for others