You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2007/09/17 06:32:32 UTC

[jira] Commented: (MYFACES-1727) h:column footerClass and headerClass does not work (issue 4 of JSR 252)

    [ https://issues.apache.org/jira/browse/MYFACES-1727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12527942 ] 

Leonardo Uribe commented on MYFACES-1727:
-----------------------------------------

I can see the problem on class (I'm working on myfaces-shared-3.0.1-SNAPSHOT):

org.apache.myfaces.shared.renderkit.html.HtmlTableRendererBase

    protected void renderColumnChildHeaderOrFooterRow(FacesContext facesContext,
        ResponseWriter writer, UIComponent uiComponent, String styleClass, boolean isHeader) throws IOException
    {
        if (uiComponent instanceof UIColumn)
        {
            // allow column to override style class, new in JSF 1.2
            if (uiComponent instanceof HtmlColumn) {
                HtmlColumn column = (HtmlColumn)uiComponent;
                if (isHeader && column.getHeaderClass()!=null)
                    styleClass = column.getHeaderClass();
                else if (!isHeader && column.getFooterClass()!=null)
                    styleClass = column.getFooterClass();
            }

But probing it, at this point or render phase all colums are children of UIColumn, so the code is never executed. 
The code is well done, this should not happen. It should receive an instance of HtmlColumn if I send this code:

				<h:dataTable id="data" styleClass="standardTable"
					headerClass="standardTable_Header"
					footerClass="standardTable_Header"
					rowClasses="standardTable_Row1,standardTable_Row2"
					columnClasses="standardTable_Column,standardTable_ColumnCentered,standardTable_Column"
					var="country" value="#{countryList.countries}">
					<h:column headerClass="customTable_header" footerClass="customTable_footer">
						<f:facet name="header">
							<h:outputText value="#{example_messages['label_country_name']}" />
						</f:facet>
						<h:commandLink action="go_country" immediate="true">
							<h:outputText value="#{country.name}" />
						</h:commandLink>
						<f:facet name="footer">
						    <h:outputText value="FOOTER"/>
						</f:facet>
					</h:column>

					<h:column>
						<f:facet name="header">
							<h:outputText value="#{example_messages['label_country_iso']}" />
						</f:facet>
						<h:outputText value="#{country.isoCode}" />
					</h:column>

					<h:column>
						<f:facet name="header">
							<h:outputText value="#{example_messages['label_country_cities']}" />
						</f:facet>
						<h:dataTable id="cities" styleClass="standardTable_Column"
							var="city" value="#{country.cities}">
							<h:column>
								<h:outputText value="#{city}" style="font-size: 11px" />
							</h:column>
						</h:dataTable>
					</h:column>
				</h:dataTable>

 I'm probing on an environment with facelets 1.1.13 + myfaces 1.2.1-SNAPSHOT + trinidad-1.2.2-SNAPSHOT
(in order to probe myfaces core with a common configuration).

I have checked standard-faces-config.xml and h.tld and all are fine.

Any suggestions?

Att: Leonardo Uribe



> h:column footerClass and headerClass does not work (issue 4 of JSR 252)
> -----------------------------------------------------------------------
>
>                 Key: MYFACES-1727
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1727
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-252
>    Affects Versions:  1.2.0, 1.2.1-SNAPSHOT
>         Environment: Tomcat 6 on Windows XP
>            Reporter: Leonardo Uribe
>
> When I tried to define headerClass and footerClass property on h:column, does not override h:dataTable headerClass and footerClass
> I will send a patch to resolve this issue soon.
> Att: Leonardo Uribe

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.