use of org.akaza.openclinica.web.pform.dto.Select1 in project OpenClinica by OpenClinica.
the class Select1Widget method getUserControl.
@Override
public UserControl getUserControl() {
Select1 select1 = new Select1();
Label label = new Label();
label.setLabel(itemFormMetadataBean.getLeftItemText());
select1.setLabel(label);
// Hint hint = new Hint();
// hint.setHint(item.getItemMeta().getLeftItemText());
// select1.setHint(hint);
select1.setRef("/" + version.getOid() + "/" + itemGroupBean.getOid() + "/" + item.getOid());
select1.setAppearance(appearance);
ArrayList<Item> itemList = new ArrayList<Item>();
select1.setItem(itemList);
ArrayList<ResponseOptionBean> options = itemFormMetadataBean.getResponseSet().getOptions();
for (ResponseOptionBean option : options) {
Item item = new Item();
Label itemLabel = new Label();
itemLabel.setLabel(option.getText());
item.setValue(option.getValue());
item.setLabel(itemLabel);
itemList.add(item);
}
return select1;
}
Aggregations