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 03:32:32 UTC

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

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.


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

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ 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.


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

Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537914 ] 

Martin Marinschek commented on MYFACES-1727:
--------------------------------------------

Hi Leonardo,

I would assume the facelets-taglib-file for the f: and h: tags is included in Facelets. So you wouldn't have to add this taglib here. I wonder why you are getting problems with this constellation...

regards,

Martin

> 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.


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

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12528164 ] 

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

I have probe this on 2 different configurations:

myfaces 1.2.1-SNAPSHOT 

and 

myfaces 1.2.1-SNAPSHOT + facelets 1.1.13 + trinidad-1.2.2-SNAPSHOT

The code works well on the first configuration, but in the second configuration not.

The problem is solved providing a created for me called h.taglib.xml like this:

<?xml version="1.0"?>
<!DOCTYPE facelet-taglib PUBLIC "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN" "facelet-taglib_1_0.dtd">
<facelet-taglib>
    <!-- author: thomas.jachmann@mindmatters.de -->
    <namespace>http://java.sun.com/jsf/html</namespace>
    <tag>
        <tag-name>column</tag-name>
        <component>
            <component-type>javax.faces.HtmlColumn</component-type>
        </component>
    </tag>
    
    <!-- SOME OTHER TAGS HERE -->

</facelet-taglib>

Conclusion: Myfaces code is well (better than jsf1.2) but it's necessary to create a wiki page explainig how to configure
myfaces 1.2 with facelets, and also create a proper file for myfaces. 







> 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.