Commit f122103c by Tuomas Riihimäki

Possible fix to template header image checking

1 parent 000c6fe8
...@@ -46,8 +46,8 @@ ...@@ -46,8 +46,8 @@
<img src="#{request.contextPath}/resources/templates/insomnia2/img/devel_logo.png" /> <img src="#{request.contextPath}/resources/templates/insomnia2/img/devel_logo.png" />
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<p:graphicImage rendered="#{!empty layoutView.headerimage}" value="#{layoutView.headerimage}" /> <p:graphicImage rendered="#{layoutView.isHeaderImage}" value="#{layoutView.headerimage}" />
<ui:fragment rendered="#{empty layoutView.headerimage}"> <ui:fragment rendered="#{!layoutView.isHeaderImage}">
<h1> <h1>
<h:outputText value="#{layoutView.headertext}" /> <h:outputText value="#{layoutView.headertext}" />
</h1> </h1>
......
...@@ -150,6 +150,11 @@ public class LayoutView { ...@@ -150,6 +150,11 @@ public class LayoutView {
// return ""; // return "";
// } // }
public boolean getIsHeaderImage()
{
return getHeaderimage() != null;
}
public StreamedContent getHeaderimage() { public StreamedContent getHeaderimage() {
if (headertext == null && headerimage == null) 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!