Skip to content

Commit c4b4999

Browse files
committed
avoid NPE, use tried and true ui:fragment render #10848
1 parent f12323a commit c4b4999

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/main/webapp/dataset.xhtml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,12 @@
7171
<ui:define name="jsonld_header">
7272
<ui:fragment rendered="#{!DatasetPage.anonymizedAccess}">
7373
<script type="application/ld+json">
74-
<c:choose>
75-
<c:when test="#{empty DatasetPage.croissant}">
76-
<h:outputText value="#{DatasetPage.jsonLd}"/>
77-
</c:when>
78-
<c:otherwise>
79-
<h:outputText value="#{DatasetPage.croissant}"/>
80-
</c:otherwise>
81-
</c:choose>
74+
<ui:fragment rendered="#{DatasetPage.croissant == null}">
75+
<h:outputText value="#{DatasetPage.jsonLd}"/>
76+
</ui:fragment>
77+
<ui:fragment rendered="#{DatasetPage.croissant != null}">
78+
<h:outputText value="#{DatasetPage.croissant}"/>
79+
</ui:fragment>
8280
</script>
8381
</ui:fragment>
8482
</ui:define>

0 commit comments

Comments
 (0)