if(items != null)
{
DefaultComboBoxModel<SelectItem> model = new DefaultComboBoxModel<SelectItem>(items);
Select input = new Select(model);
input.setPreferredSize(new Dimension(300, 22));
// set select if value available
if(nodeValue != null)
{
for(int i = 0; i < model.getSize(); i++)
{
SelectItem boxItem = (SelectItem) model.getElementAt(i);
if(boxItem.getKey().equals(nodeValue.getTextContent()))
{
input.setSelectedIndex(i);
}
}
}
if(nodeDisabled != null && nodeDisabled.getTextContent().equals("true"))
{
input.setEnabled(false);
}
item.add(label);
item.add(input);