Skip to content

Commit

Permalink
Rename fileUploadListener to listener for p:fileUpload and fix an err…
Browse files Browse the repository at this point in the history
…or in readCandidatesFromFile for SDF files.
  • Loading branch information
meier-rene committed Nov 18, 2024
1 parent 5a62fcd commit 91985fd
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ protected void readCandidatesFromFile() throws Exception {
while(keys.hasNext()) {
String curKey = keys.next();
if(!this.candidates.get(i).hasDefinedProperty(curKey)) this.candidates.get(i).setProperty(curKey, "-");
if(((String)this.candidates.get(i).getProperty(curKey)).equals("")) this.candidates.get(i).setProperty(curKey, "-");
Object property = this.candidates.get(i).getProperty(curKey);
if (property instanceof String && ((String) property).isEmpty())
this.candidates.get(i).setProperty(curKey, "-");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@
cellspacing="4" cellpadding="4" styleClass="subPanel"
rendered="#{metFragWebBean.suspectListInclusionFilterEnabled}">
<p:fileUpload id="suspectListsFilter"
fileUploadListener="#{metFragWebBean.suspectListFilterUploadListener}"
listener="#{metFragWebBean.suspectListFilterUploadListener}"
auto="true" mode="advanced" maxFileCount="10"
maxFileSize="20000000" autoUpload="true" multiple="false"
required="false" update="suspectListInclusionFilterPanel">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
<h:panelGrid columns="1">
<p:fileUpload update="retentionTimeScorePanel"
id="retentionTimeTrainingFile"
fileUploadListener="#{metFragWebBean.retentionTimeFileUploadListener}"
listener="#{metFragWebBean.retentionTimeFileUploadListener}"
auto="true" mode="advanced" maxFileCount="10"
maxFileSize="20000000" autoUpload="true" multiple="false">
</p:fileUpload>
Expand Down Expand Up @@ -244,7 +244,7 @@
cellspacing="4" cellpadding="4" styleClass="subPanel"
rendered="#{metFragWebBean.suspectListInclusionScoreEnabled}">
<p:fileUpload id="suspectListsScore"
fileUploadListener="#{metFragWebBean.suspectListScoreUploadListener}"
listener="#{metFragWebBean.suspectListScoreUploadListener}"
auto="true" mode="advanced" maxFileCount="10"
maxFileSize="20000000" autoUpload="true" multiple="false"
required="false" update="suspectListInclusionScorePanel">
Expand Down
2 changes: 1 addition & 1 deletion MetFragWeb/src/main/webapp/includes/databasePrime.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<h:panelGrid columns="1"
rendered="#{metFragWebBean.localDatabaseDefined}">
<p:fileUpload update="mainForm:mainAccordion" id="candidateFileUpload"
fileUploadListener="#{metFragWebBean.candidateFileUploadListener}"
listener="#{metFragWebBean.candidateFileUploadListener}"
auto="true" mode="advanced">
</p:fileUpload>
<h:panelGroup id="candidateFileName" layout="block"
Expand Down
2 changes: 1 addition & 1 deletion MetFragWeb/src/main/webapp/includes/uploadParameters.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
value="Upload parameters as ZIP file" />
<br />
<p:fileUpload update="uploadParametersPanel" id="parametersUpload"
fileUploadListener="#{metFragWebBean.parametersUploadListener}"
listener="#{metFragWebBean.parametersUploadListener}"
auto="true" mode="advanced">
</p:fileUpload>
<h:panelGroup id="uploadParametersError" style="padding-top: 10px"
Expand Down

0 comments on commit 91985fd

Please sign in to comment.