Commit f122103c by Tuomas Riihimäki

Possible fix to template header image checking

1 parent 000c6fe8
......@@ -46,8 +46,8 @@
<img src="#{request.contextPath}/resources/templates/insomnia2/img/devel_logo.png" />
</c:when>
<c:otherwise>
<p:graphicImage rendered="#{!empty layoutView.headerimage}" value="#{layoutView.headerimage}" />
<ui:fragment rendered="#{empty layoutView.headerimage}">
<p:graphicImage rendered="#{layoutView.isHeaderImage}" value="#{layoutView.headerimage}" />
<ui:fragment rendered="#{!layoutView.isHeaderImage}">
<h1>
<h:outputText value="#{layoutView.headertext}" />
</h1>
......
......@@ -150,6 +150,11 @@ public class LayoutView {
// return "";
// }
public boolean getIsHeaderImage()
{
return getHeaderimage() != null;
}
public StreamedContent getHeaderimage() {
if (headertext == null && headerimage == null)
{
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!