Author: amarkhel
Date: 2009-06-04 11:38:05 -0400 (Thu, 04 Jun 2009)
New Revision: 14479
Modified:
branches/community/3.3.X/ui/layout/src/main/java/org/richfaces/renderkit/AbstractPageRenderer.java
branches/community/3.3.X/ui/layout/src/main/templates/org/richfaces/htmlPage.jspx
Log:
Fix RF-7249
Modified:
branches/community/3.3.X/ui/layout/src/main/java/org/richfaces/renderkit/AbstractPageRenderer.java
===================================================================
---
branches/community/3.3.X/ui/layout/src/main/java/org/richfaces/renderkit/AbstractPageRenderer.java 2009-06-04
15:37:37 UTC (rev 14478)
+++
branches/community/3.3.X/ui/layout/src/main/java/org/richfaces/renderkit/AbstractPageRenderer.java 2009-06-04
15:38:05 UTC (rev 14479)
@@ -219,4 +219,7 @@
return null != component.getFacet(facet);
}
+ public boolean hasTitle(FacesContext context, UIComponent component) {
+ return component.getAttributes().get("pageTitle") != null &&
!component.getAttributes().get("pageTitle").toString().trim().equals("");
+ }
}
Modified:
branches/community/3.3.X/ui/layout/src/main/templates/org/richfaces/htmlPage.jspx
===================================================================
---
branches/community/3.3.X/ui/layout/src/main/templates/org/richfaces/htmlPage.jspx 2009-06-04
15:37:37 UTC (rev 14478)
+++
branches/community/3.3.X/ui/layout/src/main/templates/org/richfaces/htmlPage.jspx 2009-06-04
15:38:05 UTC (rev 14479)
@@ -17,7 +17,9 @@
<html x:xmlns="#{namespace}" x:lang="#{context.viewRoot.locale}"
<head>
+ <c:if test="#{this:hasTitle(context,component)}">
<title>#{component.attributes['pageTitle']}</title>
+ </c:if>
<f:call name="themeStyle"/>
<f:call name="themeScript"/>
<f:call name="pageStyle"/>