<f:facet> only looks at the first entry in its body, so you need to
enclose all of your <h:outputText> and <h:commandLink.
actions inside <h:panelGroup>...</h:panelGroup> to have them
rendered as part of the header.
-
Brendan
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 07, 2005 4:17 PM
To: MyFaces Discussion
Subject: Headers w/ panelGrid problem
Attached is an image of a table generated by the following markup. Only the first cell of the header is rendered and it is repeated. The other cells of the header are rendered as normal cells. Ideas?
<h:form>
<h:panelGrid styleClass="data" columns="4" rowClasses="greyBack, whiteBack"
columnClasses="codeColumn, textColumn, editColumn, deleteColumn">
<f:facet name="header">
<h:outputText value="#{domainTableBacker.codeLabel}" />
<h:outputText value="#{domainTableBacker.textLabel}" />
<h:commandLink value="Save" action="" />
<h:commandLink value="Cancel" immediate="true" action="" />
</f:facet>
<h:outputText value="#{domainTableBacker.codeLabel}" />
<h:outputText value="#{domainTableBacker.textLabel}" />
<h:commandLink value="Save" action="" />
<h:commandLink value="Cancel" immediate="true" action="" />
<h:panelGroup>
<h:outputText styleClass="code" rendered="#{not domainTableCrudBacker.addMode}"
value="#{domainTableCrudBacker.unit.codeValue}" />
<h:inputText styleClass="code" rendered="#{domainTableCrudBacker.addMode}"
value="#{domainTableCrudBacker.unit.codeValue}" required="true" id="code" />
</h:panelGroup>
<h:inputText styleClass="text" value="#{domainTableCrudBacker.unit.textValue}" required="true" id="text" />
<h:inputHidden rendered="#{not domainTableCrudBacker.addMode}" value="#{domainTableCrudBacker.unit.codeValue}" />
<h:outputText value="" />
</h:panelGrid>
<h:message for="" styleClass="validationMessage" />
<h:message for="" styleClass="validationMessage" />
</h:form>
Dennis Byrne

