}
private void setup() throws Exception
{
List<UIFormInputSet> uiInputSetList = new ArrayList<UIFormInputSet>();
UIFormTableInputSet uiTableInputSet = getChild(UIFormTableInputSet.class);
int i = 0;
for (Application app : applications_)
{
UIFormInputSet uiInputSet = new UIFormInputSet(app.getId());
ArrayList<SelectItemOption<String>> options = new ArrayList<SelectItemOption<String>>(5);
options.add(new SelectItemOption<String>("", String.valueOf(i)));
UIFormRadioBoxInput uiRadioInput = new UIFormRadioBoxInput(FIELD_APPLICATION, "", options);
//TODO review
if (i == 0)
{
uiRadioInput.setValue(options.get(0).getValue());
}
//----------------------------------------------
uiInputSet.addChild(uiRadioInput);
UIFormInputInfo uiInfo = new UIFormInputInfo("label", null, app.getDisplayName());
uiInputSet.addChild(uiInfo);
uiInfo = new UIFormInputInfo("description", null, app.getDescription());
uiInputSet.addChild(uiInfo);
uiTableInputSet.addChild(uiInputSet);
uiInputSetList.add(uiInputSet);
i++;
}
UIFormPageIterator uiIterator = uiTableInputSet.getChild(UIFormPageIterator.class);
SerializablePageList<UIFormInputSet> pageList = new SerializablePageList<UIFormInputSet>(UIFormInputSet.class, uiInputSetList, 10);
uiIterator.setPageList(pageList);
}