Table t = new Table();
for ( Enumeration e = v.elements(); e.hasMoreElements(); )
{
String item = ((String)e.nextElement()).trim();
Input cb = new Input(Input.CHECKBOX, prefix + item, item);
cb.setChecked(value.indexOf(item) >= 0);
cb.setOnClick(getJavascript(name, v, prefix));
ElementContainer temp = new ElementContainer();
temp.addElement(cb).addElement(" ").addElement(item);
if ( layout.equalsIgnoreCase(LAYOUT_NS) )
{
t.addElement(new TR().addElement(new TD(temp)));
} else
{
result.addElement(temp);
}
}
if ( layout.equalsIgnoreCase(LAYOUT_NS) )
{
result.addElement(t);
}
result.addElement(new Input(Input.HIDDEN, name, value));
return result.toString();
}