Skip to content

Commit

Permalink
select new node after duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
rsehr committed Aug 30, 2024
1 parent 3921ca1 commit 69a534e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1067,9 +1067,7 @@ public void addNode() {
entry.setNodeType(selectedEntry.getNodeType());
selectedEntry.addSubEntry(entry);
selectedEntry.setDisplayChildren(true);
selectedEntry.setSelected(false);
selectedEntry = entry;
selectedEntry.setSelected(true);
setSelectedEntry(entry);
flatEntryList = null;
selectedEntry.calculateFingerprint();
ArchiveManagementManager.saveNode(recordGroup.getId(), entry);
Expand Down Expand Up @@ -2733,6 +2731,9 @@ public void duplicateNode() {
updateChangeHistory(selectedEntry);
}
ArchiveManagementManager.saveNode(recordGroup.getId(), copy);

setSelectedEntry(copy);

resetFlatList();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,11 @@ public IMetadataField copy(String prefix, String suffix) {
} else {
for (IFieldValue val : values) {
IFieldValue newValue = new FieldValue(field);
newValue.setValue(prefix + val.getValue() + suffix);
if (val.getValue() != null) {
newValue.setValue(prefix + val.getValue() + suffix);
} else {
newValue.setValue(prefix + suffix);
}
newValue.setAuthorityType(val.getAuthorityType());
newValue.setAuthorityValue(val.getAuthorityValue());
field.addFieldValue(newValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@
value="tooltip" />
<f:ajax
execute="@this"
render="hierarchy:hierarchy"
render="hierarchy:hierarchy nodeBox:nodeContentArea"
onevent="(data) => {gwHandleTooltip.init(data); gwInitTooltips.init();}" />
</h:commandLink>
<h:commandLink
Expand Down

0 comments on commit 69a534e

Please sign in to comment.