if(action.equals("edit_metadata"))
{
Iterator fieldsIter = meta.getFields().iterator();
while (fieldsIter.hasNext())
{
LocalizedField field = (LocalizedField) fieldsIter.next();
String id = field.getId().toString();
String value = actionRequest.getParameter(id + ":value");
if (value != null)
{
if (!value.equals(field.getValue()))
{
field.setValue(value);
modified = true;
}
}
}
}
else if (action.equals("remove_metadata"))
{
String[] ids = actionRequest.getParameterValues("metadata_id");
if (ids != null)
{
Iterator fieldsIter = meta.getFields().iterator();
int count = 0;
while (fieldsIter.hasNext())
{
LocalizedField field = (LocalizedField) fieldsIter.next();
String id = field.getId().toString();
for(int i=0; i<ids.length; i++)
{
String mid = ids[i];
if(mid.equals(id))