header.addCell().addContent(T_column1);
header.addCell().addContent(T_column2);
header.addCell().addContent(T_column3);
header.addCell().addContent(T_column4);
ChoiceAuthorityManager cmgr = ChoiceAuthorityManager.getManager();
for(DCValue value : values)
{
String name = value.schema + "_" + value.element;
if (value.qualifier != null)
name += "_" + value.qualifier;
Row row = table.addRow(name,Row.ROLE_DATA,"metadata-value");
CheckBox remove = row.addCell().addCheckBox("remove_"+index);
remove.setLabel("remove");
remove.addOption(index);
Cell cell = row.addCell();
cell.addContent(name.replaceAll("_", ". "));
cell.addHidden("name_"+index).setValue(name);
// value entry cell:
Cell mdCell = row.addCell();
String fieldKey = MetadataAuthorityManager.makeFieldKey(value.schema, value.element, value.qualifier);
// put up just a selector when preferred choice presentation is select:
if (cmgr.isChoicesConfigured(fieldKey) &&
Params.PRESENTATION_SELECT.equals(cmgr.getPresentation(fieldKey)))
{
Select mdSelect = mdCell.addSelect("value_"+index);
mdSelect.setSize(1);
Choices cs = cmgr.getMatches(fieldKey, value.value, collectionID, 0, 0, null);
if (cs.defaultSelected < 0)
mdSelect.addOption(true, value.value, value.value);
for (int i = 0; i < cs.values.length; ++i)
{
mdSelect.addOption(i == cs.defaultSelected, cs.values[i].value, cs.values[i].label);