Skip to content

Commit a156967

Browse files
committed
update custom report record after saving
1 parent 9322807 commit a156967

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/reports/custom/CustomReportsPanel.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public void onSuccess(List<GUIReport> reports) {
174174
});
175175
}
176176

177-
private void updateReportRecord(GUIReport report) {
177+
void updateReportRecord(GUIReport report) {
178178
for (ListGridRecord rcd : list.getRecords()) {
179179
if (Long.parseLong(rcd.getAttributeAsString("id")) == report.getId()) {
180180
updateRecord(rcd, report);
@@ -188,6 +188,7 @@ private void updateRecord(ListGridRecord rcd, GUIReport report) {
188188

189189
rcd.setAttribute("running",
190190
rcd.getAttribute("name").equals(report.getName()) && report.getStatus() == GUIReport.STATUS_RUNNING);
191+
rcd.setAttribute("name", report.getName());
191192
rcd.setAttribute("status", report.getStatus());
192193
rcd.setAttribute("lastRun", report.getLastRun());
193194
rcd.setAttribute("lastModified", report.getLastModified());

logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/reports/custom/ReportDetailsPanel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,14 @@ public void onSave() {
128128
public void onSuccess(GUIReport report) {
129129
tabSet.hideSave();
130130
if (report != null) {
131-
reportsPanel.updateRecord(report);
131+
reportsPanel.updateReportRecord(report);
132132
reportsPanel.showReportDetails(report);
133133
}
134134
}
135135
});
136136
}
137137
}
138-
138+
139139
@Override
140140
public boolean equals(Object other) {
141141
return super.equals(other);

logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/reports/custom/ReportStandardProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ private void refresh() {
7171

7272
StaticTextItem id = ItemFactory.newStaticTextItem("id", Long.toString(report.getId()));
7373

74-
TextItem name = ItemFactory.newSimpleTextItem("name", report.getName());
74+
TextItem name = ItemFactory.newSimpleTextItemWithHyphen("name", report.getName());
7575
name.addChangedHandler(changedHandler);
7676

7777
TextAreaItem description = ItemFactory.newTextAreaItem("description", report.getDescription());

0 commit comments

Comments
 (0)