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.