Skip to content

Commit

Permalink
fix(ui): make citation download widget JSF 4 compliant
Browse files Browse the repository at this point in the history
The backing bean actions were attached to normal "<a>" elements,
which means they were executed on page load and not, as expected,
via JavaScript onClick. Former versions of JSF were less strict,
now we need to use the standard compliant "<h:commandLink>"
  • Loading branch information
poikilotherm committed Jun 28, 2023
1 parent b6659d4 commit 7ce2cc9
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/main/webapp/dataset-citation.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,13 @@
</button>
<ul class="dropdown-menu">
<li>
<a jsf:id="endNoteLink" jsf:action="#{DatasetPage.fileDownloadService.downloadDatasetCitationXML(DatasetPage.dataset)}" >
#{bundle['dataset.cite.downloadBtn.xml']}
</a>
<h:commandLink id="endNoteLink" value="#{bundle['dataset.cite.downloadBtn.xml']}" action="#{DatasetPage.fileDownloadService.downloadDatasetCitationXML(DatasetPage.dataset)}"/>
</li>
<li>
<a jsf:id="risLink" jsf:actionListener="#{DatasetPage.fileDownloadService.downloadDatasetCitationRIS(DatasetPage.dataset)}">
#{bundle['dataset.cite.downloadBtn.ris']}
</a>
<h:commandLink id="risLink" value="#{bundle['dataset.cite.downloadBtn.ris']}" action="#{DatasetPage.fileDownloadService.downloadDatasetCitationRIS(DatasetPage.dataset)}"/>
</li>
<li>
<a jsf:id="bibLink" jsf:actionListener="#{DatasetPage.fileDownloadService.downloadDatasetCitationBibtex(DatasetPage.dataset)}" target="_blank">
#{bundle['dataset.cite.downloadBtn.bib']}
</a>
<h:commandLink id="bibLink" value="#{bundle['dataset.cite.downloadBtn.bib']}" action="#{DatasetPage.fileDownloadService.downloadDatasetCitationBibtex(DatasetPage.dataset)}" target="_blank"/>
</li>
</ul>
</div>
Expand Down

0 comments on commit 7ce2cc9

Please sign in to comment.