Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSF 2 - ui:include not working in facelet

843844Mar 1 2010 — edited Jun 1 2010
Hi,

I am working on few page layout templates.I am trying to include a facelet in another facelet as below -
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jstl/core">

<h:panelGroup rendered="${component.renderer != null}" id="${component.name}_${component.instanceID}" 
       			style="#{component.style.cssProperties};border:1px solid black;" styleClass="#{component.style.cssStyle}">

-${component.renderer}-
-${component}-
-${component.childComponent}-
	
         	    	<ui:include src="${component.renderer}">
         	    			<ui:param name="component" value="${component}"/>
					</ui:include>
	 	</h:panelGroup>				
</ui:composition>
When i see the response of the page , i am able to see ${component.renderer},${component.childComponent} etc coming fine to this page.
But the page for some mysterious reason is not including the facelet using <ui:include src="${component.renderer}"> call.

The output i am seeing for ${component.renderer} is '/renderer/component/layout/headerRenderer.xhtml' , and i have a file '/renderer/component/layout/headerRenderer.xhtml' present in my war.

Could anyone please help me identify the probable cause.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 29 2010
Added on Mar 1 2010
11 comments
2,092 views