0

In a dataTable a column contains lots of images which are conditionally rendered one at a time. That content was common with other dataTables so I decided to move it in a separate file and now I have something like this:

<h:column><ui:include src="myFile,xhtml" /></h:column>

Inside the h:column tag there was also the following f:facet tag, which was moved with the rest of the code

<f:facet name="header">Status</f:facet>

Now the column content is correctly displayed but the header is empty. Why ? Maybe the ui:include is evaluated after the column headers are created...in that case I would need to be pointed to a good documentation for gaining a better insight on how JSF builds and renders a dataTable.

I forgot to mention I'm using Mojarra 2.0/2.1.

Thanks Filippo

Filippo
  • 1,123
  • 1
  • 11
  • 28
  • Are you sure that file name is `myFile,xhtml` (with comma), not `myFile.xhtml` (with dot)? – DRCB Aug 14 '12 at 07:48
  • Actually the file name is completely different, I wrote it as an example, and sure I did a typing error putting a comma where a dot is needed – Filippo Aug 14 '12 at 09:20
  • @Filippo can't be done that way look at this http://stackoverflow.com/a/11023471/617373 – Daniel Aug 14 '12 at 09:34
  • I'm still missing something to fully understand it. myFile.xhtml contains both f:facet tag handler and other ui components. The last ones work fine but the header is not displayed. I can achieve my goal moving back the f:facet portion from myFile.xhtml and leave there only the ui components, but I would like to understand better what happens... – Filippo Aug 14 '12 at 10:16

0 Answers0