voyent
Facelet template static ui:insert and ui:define not working  XML
Forum Index -> General Help
Author Message
maxi_ng

Joined: 11/Jan/2008 00:00:00
Messages: 92
Offline


Here is my project file structure (only .jspx)

Project
---webpages
------WEB-INF
---------client
------------header.jspx
------------content.jspx
------------footer.jspx
------template.jspx
 


template.jspx
Code:
 <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:ice="http://www.icesoft.com/icefaces/component">
 
 <ice:outputDeclaration doctypeRoot="HTML"
                        doctypePublic="-//W3C//DTD XHTML 1.0 Strict//EN"
                        doctypeSystem="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" />
 <head>
     <!-- page title param passed in by param -->
     <title>ICEfaces Facelets Tutorial </title>
 </head>
 <body>
 <div class="page">
     <div class="header">
         <ui:include src="/WEB-INF/client/header.jspx"/>
     </div>
     <div class="content">
         <ui:insert name="content">
             Default Content
         </ui:insert>
     </div>
     <div class="footer">
         <ui:include src="/WEB-INF/client/footer.jspx"/>
     </div>   
 </div>
 </body>
 </html>
 


header and footer is working just fine by direct include.
the content with indirect include is not working.

content.jspx
Code:
 <ui:composition template="templateParent.jspx"
                 xmlns="http://www.w3.org/1999/xhtml"
                 xmlns:ui="http://java.sun.com/jsf/facelets"
                 xmlns:f="http://java.sun.com/jsf/core"
                 xmlns:ice="http://www.icesoft.com/icefaces/component">
     
     <ui:define name="content">
         
         <ice:commandButton value="Content"/>
         
     </ui:define>
     
 </ui:composition>
 


The page is showing "Default Content" instead of a commandButton that I am expecting.

Is it because my template attribute is not correct?
 
Forum Index -> General Help
Go to:   
Powered by JForum 2.1.7ice © JForum Team