Hi David,
The template I want is 
<table>
<tr><td colspan=2>header</td></tr>
<tr><td>sidemenu</td>  <td>content</td></tr>
<tr><td colspan=2>footer</td><tr>
</table>
in jsf:
<h:panelGrid columns="2">
<f:facet name=header>
   header
</f:facet>
<h:panelGrid>sidebar</h:panelGrid>
<h:panelGrid>content</h:panelGrid>
<f:facet name="footer">
   footer
</f:facet>
I ever used the template in myface/tiles, and it displayed fine. However,
when I transfer the codes to facelets, it did not display well. I do not
know why. Thank you for help.

Best regards,

Gus


David Friedman-2 wrote:
> 
> What was your final html ?  Did it list them as two different columns (i.e
> "td" tags) or did it put them together?  If it put them both inside one
> "td"
> tag, I recommend you try putting each h:form section inside the
> h:panelGroup
> tag or perhaps inside another "container" tag which works within
> h:panelGrid.
> 
> Regards,
> David
> 
> -----Original Message-----
> From: Gus [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 10, 2006 2:34 PM
> To: users@myfaces.apache.org
> Subject: RE: Problem with myfaces/facelets template.xhtml
> 
> 
> 
> Hi David,
> 
> Thank you for your very quick reply. I got a little understand. Yes, the
> two
> ui:include(header and footer) go to the right way, but the ui:insert
> (sidebar and content) are not rendered correctly in the h:panelGrid
> columns="2". Could you please give me some advice modifying it? Thanks
> again
> for your help.
> 
> Gus
> 
> 
> David Friedman-2 wrote:
>>
>> Gus,
>>
>> There is a little thing with Facelets that some components are compile
>> time
>> and some are render time.  I think you are mixing the two.  You might try
>> putting each form inside h:panelGroup so ui:include can be sure where to
>> place itself.  Also, did you get your columns created in the
>> final/outputted
>> html or is it skipping that, which might support my suggestion.
>>
>> Regards,
>> David
>>
>> -----Original Message-----
>> From: Gus [mailto:[EMAIL PROTECTED]
>> Sent: Thursday, August 10, 2006 1:50 PM
>> To: users@myfaces.apache.org
>> Subject: Problem with myfaces/facelets template.xhtml
>>
>>
>>
>> Hi everyone,
>>
>> I just begin to learn Facelets and Myfaces. I created a template, but the
>> template did display as expected. The "sidebar" and "content" should be
>> displayed in two columns as left and right, but it always display in one
>> columns as up and down. I really do not have any idea how to fix it. Any
>> help will be apprieciated. Thank you in advance.
>>
>> Gus
>> ============= Template.xhtml ==================
>>
>> <t:document 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:t="http://myfaces.apache.org/tomahawk";
>>         xmlns:http="http://www.disy.de/commons/facelets/tag/http";>
>>     <f:view>
>>         <t:documentHead>
>>
>>             <title>Global Documents</title>
>>             <t:stylesheet path="styles.css"/>
>>
>>                 <!-- include file="/template/_jscript.js" -->
>>                 <!--@ include file="/template/AjaxRequest.js"  -->
>>             </script>
>>         </t:documentHead>
>>         <t:documentBody>
>>             <h:panelGrid columns="1" styleClass="mainBody"
>> rowClasses="row"
>>                     cellspacing="0" cellpadding="0" border="1">
>>                 <!-- header insert -->
>>                 <f:facet name="header">
>>                     <h:form id="menuForm">
>>                         <ui:include src="header.xhtml"/>
>>                     </h:form>
>>                 </f:facet>
>>
>>                 <!-- body insert  -->
>>                 <h:panelGrid columns="2" border="0"
>>                         styleClass="contentBody"
>>                         columnClasses="sidemenu, content"
>>                         cellspacing="1" cellpadding="0">
>>
>>                     <!-- submenu of side bar insert  -->
>>                     <h:form id="sidemenuForm">
>>                         <ui:insert name="sidebar"/>
>>                        </h:form>
>>
>>                     <!-- content insert  -->
>>                     <h:form id="contentForm"
>> enctype="multipart/form-data">
>>                         <ui:insert name="content"/>
>>                     </h:form>
>>                 </h:panelGrid>
>>
>>                 <!--  footer insert  -->
>>                 <f:facet name="footer">
>>                     <ui:include src="footer.xhtml"/>
>>                 </f:facet>
>>             </h:panelGrid>
>>         </t:documentBody>
>>     </f:view>
>> </t:document>
>> --
>> View this message in context:
>>
> http://www.nabble.com/Problem-with-myfaces-facelets-template.xhtml-tf2086138
>> .html#a5749229
>> Sent from the MyFaces - Users forum at Nabble.com.
>>
>>
>>
> 
> --
> View this message in context:
> http://www.nabble.com/Problem-with-myfaces-facelets-template.xhtml-tf2086138
> .html#a5749920
> Sent from the MyFaces - Users forum at Nabble.com.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Problem-with-myfaces-facelets-template.xhtml-tf2086138.html#a5752389
Sent from the MyFaces - Users forum at Nabble.com.

Reply via email to