Autoren von Publikationen ließen sich nicht entfernen (Ticket #1449)

git-svn-id: https://svn.libreccm.org/ccm/trunk@1965 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2012-11-26 14:29:26 +00:00
parent 6273224fb6
commit 7367e90b05
2 changed files with 14 additions and 9 deletions

View File

@ -234,7 +234,7 @@ public class PublicationBundle extends ContentBundle {
public void removeAuthor(final GenericPerson author) {
Assert.exists(author, GenericPerson.class);
remove(AUTHORS, author);
remove(AUTHORS, author.getContentBundle());
updateAuthorsStr();
}

View File

@ -140,6 +140,7 @@ public class PublicationAuthorsTable
(Publication) m_itemModel.getSelectedObject(state);
return new PublicationAuthorsTableModel(table, state, publication);
}
}
private class PublicationAuthorsTableModel implements TableModel {
@ -207,6 +208,7 @@ public class PublicationAuthorsTable
public Object getKeyAt(int columnIndex) {
return m_author.getID();
}
}
private class EditCellRenderer
@ -267,6 +269,7 @@ public class PublicationAuthorsTable
return label;
}
}
}
private class EditAssocCellRenderer
@ -299,6 +302,7 @@ public class PublicationAuthorsTable
return label;
}
}
}
private class DeleteCellRenderer
@ -335,6 +339,7 @@ public class PublicationAuthorsTable
return label;
}
}
}
private class UpCellRenderer
@ -360,6 +365,7 @@ public class PublicationAuthorsTable
return link;
}
}
}
private class DownCellRenderer
@ -390,6 +396,7 @@ public class PublicationAuthorsTable
return link;
}
}
}
@Override
@ -398,20 +405,17 @@ public class PublicationAuthorsTable
s_log.info("cellSelected!");
GenericPerson author =
new GenericPerson(new BigDecimal(event.getRowKey().
toString()));
GenericPerson author = new GenericPerson(new BigDecimal(event.getRowKey().toString()));
Publication publication = (Publication) m_itemModel.getSelectedObject(
state);
Publication publication = (Publication) m_itemModel.getSelectedObject(state);
AuthorshipCollection authors = publication.getAuthors();
TableColumn column = getColumnModel().get(event.getColumn().intValue());
if (column.getHeaderKey().toString().equals(TABLE_COL_EDIT)) {
} else if (column.getHeaderKey().toString().equals(
TABLE_COL_EDIT_ASSOC)) {
//Nothing
} else if (column.getHeaderKey().toString().equals(TABLE_COL_EDIT_ASSOC)) {
while (authors.next()) {
if (authors.getAuthor().equals(author)) {
@ -442,4 +446,5 @@ public class PublicationAuthorsTable
public void headSelected(TableActionEvent event) {
//Nothing to do here.
}
}