Skip to content

Commit

Permalink
refresh the changed error/lock message after a file validation failur…
Browse files Browse the repository at this point in the history
…e. (#6558)
  • Loading branch information
landreev committed Apr 2, 2020
1 parent 790a5e5 commit fdfb767
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions src/main/java/edu/harvard/iq/dataverse/DatasetPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -3654,11 +3654,8 @@ public boolean isStillLockedForAnyReason() {
if (testDataset.getLocks().size() > 0) {
if (lockedForAsyncPublish) {
if (testDataset.isLockedFor(DatasetLock.Reason.FileValidationFailed)) {
//if (FacesContext.getCurrentInstance().getExternalContext().getFlash().get("errorMsg") == null) {
JH.addMessage(FacesMessage.SEVERITY_ERROR, BundleUtil.getStringFromBundle("dataset.publish.file.validation.error.message"),
BundleUtil.getStringFromBundle("dataset.publish.file.validation.error.details"));
init();
//}
/* and now that we've shown the message to the user - remove the lock? */
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/dataset.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@
<p:fragment id="pageRefreshFragment"> <!-- rendered="_{empty DatasetPage.editMode}" -->
<h:inputHidden value="#{DatasetPage.lockedForAnyReason}" id="datasetLockedForAnyReasonVariable" />
<h:inputHidden value="#{DatasetPage.stateChanged}" id="datasetStateChangedVariable" />
<p:remoteCommand name="refreshAllLocksCommand" process="@this" update=":#{p:resolveClientId('datasetForm:pageRefreshFragment', view)}" actionListener="#{DatasetPage.refreshAllLocks()}"/>
<p:remoteCommand name="refreshAllLocksCommand" process="@this" update=":#{p:resolveClientId('datasetForm:pageRefreshFragment', view)},:messagePanel" actionListener="#{DatasetPage.refreshAllLocks()}"/>
<p:remoteCommand name="refreshAllCommand" process="@this" update=":datasetForm:topDatasetBlockFragment,:datasetForm:tabView:filesTable,:messagePanel" action="#{DatasetPage.refresh()}"/>
<!-- see the comment in the javascript below that explains what this button is for -->
<p:commandButton id="refreshButton" process="@this" widgetVar="refreshButton" update=":datasetForm:topDatasetBlockFragment,:datasetForm:tabView:filesTable" style="display:none"/>
Expand Down

0 comments on commit fdfb767

Please sign in to comment.