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 == 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";> Global Documents -- 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.
RE: Problem with myfaces/facelets template.xhtml
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 == 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";> Global Documents -- 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.
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 == > > 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";> > > > > Global Documents > > > > > > > > rowClasses="row" > cellspacing="0" cellpadding="0" border="1"> > > > > > > > > > styleClass="contentBody" > columnClasses="sidemenu, content" > cellspacing="1" cellpadding="0"> > > > > > > > > enctype="multipart/form-data"> > > > > > > > > > > > > > -- > 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.
RE: Problem with myfaces/facelets template.xhtml
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 == > > 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";> > > > > Global Documents > > > > > > > > rowClasses="row" > cellspacing="0" cellpadding="0" border="1"> > > > > > > > > > styleClass="contentBody" > columnClasses="sidemenu, content" > cellspacing="1" cellpadding="0"> > > > > > > > > enctype="multipart/form-data"> > > > > > > > > > > > > > -- > 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.
RE: Problem with myfaces/facelets template.xhtml
Hi David, The template I want is header sidemenu content footer in jsf: header sidebar content footer 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 == >> >> 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";> >> >> >> >> Global Documents >> >> >> >> >> >> >> >> > rowClasses="row" >> cellspacing="0" cellpadding="0" border="1"> >> >> >> >> >> >> >> >> >> > styleClass="contentBody" >> columnClasses="sidemenu, content" >> cellspacing="1" cellpadding="0"> >> >> >> >> >> >> >> >> > enctype="multipart/form-data"> >> >> >> >> >> >> >> >> >> >> >> >> >> -- >> 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.
RE: Problem with myfaces/facelets template.xhtml
Right, but what did you get over in your browser? Knowing what came out in the wrong places in the browser helps you figure out what parts of the .xhtml page are acting incorrectly. THEN we can act/work on those items. Regards, David -Original Message- From: Gus [mailto:[EMAIL PROTECTED] Sent: Thursday, August 10, 2006 4:54 PM To: users@myfaces.apache.org Subject: RE: Problem with myfaces/facelets template.xhtml Hi David, The template I want is header sidemenu content footer in jsf: header sidebar content footer 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
RE: Problem with myfaces/facelets template.xhtml
I had similar problems. What I have discovered is that if you place the column in a h:panelGroup the issues will go away. I have noticed that comments and jstl will cause the html to rendered incorrectly. For Instance <\h:panelGroup> > > Make sure any comments or jstl are inside the h:panelGroup Hope this helps, Tom -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 == > > 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";> > > > > Global Documents > > > > > > > > rowClasses="row" > cellspacing="0" cellpadding="0" border="1"> > > > > > > > > > styleClass="contentBody" > columnClasses="sidemenu, content" > cellspacing="1" cellpadding="0"> > > > > > > > > enctype="multipart/form-data"> > > > > > > > > > > > > > -- > 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.
RE: Problem with myfaces/facelets template.xhtml
David, The sidebar and content should be in two columns(left and right), but they were displayed in one column (top and down). I did not review the rendered html code. I will send it you later. Thank you. Best wishes! Gus. David Friedman-2 wrote: > > Right, but what did you get over in your browser? Knowing what came out > in > the wrong places in the browser helps you figure out what parts of the > .xhtml page are acting incorrectly. THEN we can act/work on those items. > > Regards, > David > > -Original Message- > From: Gus [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 10, 2006 4:54 PM > To: users@myfaces.apache.org > Subject: RE: Problem with myfaces/facelets template.xhtml > > > > Hi David, > The template I want is > > header > sidemenu content > footer > > in jsf: > > >header > > sidebar > content > >footer > > 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 > > > -- View this message in context: http://www.nabble.com/Problem-with-myfaces-facelets-template.xhtml-tf2086138.html#a5753030 Sent from the MyFaces - Users forum at Nabble.com.
RE: Problem with myfaces/facelets template.xhtml
Hi David, It seems I found the problem. After I moved the several comments in the template.html, it displays correctly. Modified codes is as follows: Thank you so much for your help. Best regards, Gus David Friedman-2 wrote: > > Right, but what did you get over in your browser? Knowing what came out > in > the wrong places in the browser helps you figure out what parts of the > .xhtml page are acting incorrectly. THEN we can act/work on those items. > > Regards, > David > > -Original Message- > From: Gus [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 10, 2006 4:54 PM > To: users@myfaces.apache.org > Subject: RE: Problem with myfaces/facelets template.xhtml > > > > Hi David, > The template I want is > > header > sidemenu content > footer > > in jsf: > > >header > > sidebar > content > >footer > > 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 > > > -- View this message in context: http://www.nabble.com/Problem-with-myfaces-facelets-template.xhtml-tf2086138.html#a5754667 Sent from the MyFaces - Users forum at Nabble.com.
Re: Problem with myfaces/facelets template.xhtml
On 8/10/06, Gus <[EMAIL PROTECTED]> wrote: It seems I found the problem. After I moved the several comments in the template.html, it displays correctly. Modified codes is as follows: Hey Gus. Yes, that's right, now that you point it out. Text (even if it is comments) is internally treated by facelets (and also JSF 1.2) as a "literal text component". So each block of text occupies a space in your panelGrid, giving you the following output. comment menu comment page One thing you can do is tell facelets to skip all comments (they won't be in your final generated html, el expressions in them won't be evaluated, and they won't be treated as components).
Re: Problem with myfaces/facelets template.xhtml
Hi Mike, Thank you very much for your help on this thread. In fact, I noticed the commend issue when I read facelets document, but I misunderstood that the comment is about commenting some tags, e.g.