You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Cameron Bateman (JIRA)" <de...@myfaces.apache.org> on 2007/12/19 03:42:43 UTC

[jira] Created: (MYFACES-1790) HtmlColumnTag.getComponentType returns the wrong value

HtmlColumnTag.getComponentType returns the wrong value
------------------------------------------------------

                 Key: MYFACES-1790
                 URL: https://issues.apache.org/jira/browse/MYFACES-1790
             Project: MyFaces Core
          Issue Type: Bug
          Components: General
    Affects Versions:  1.2.0
            Reporter: Cameron Bateman


According to the spec, the component type of the default h:column tag is supposed to be "javax.faces.Column", however HtmlColumnTag returns "javax.faces.HtmlColumn".

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


[jira] Issue Comment Edited: (MYFACES-1790) HtmlColumnTag.getComponentType returns the wrong value

Posted by "Mario Ivankovits (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12555525#action_12555525 ] 

imario edited comment on MYFACES-1790 at 1/3/08 2:19 AM:
-------------------------------------------------------------------

This fixed broke the HtmlColumn component as now is tag (HtmlColumnTag) creates a UIColumn component instead of a HtmlColumn.

      was (Author: imario):
    This fixed broke the HtmlColumn component as now it tag creates a UIColumn component instead of a HtmlColumn
  
> HtmlColumnTag.getComponentType returns the wrong value
> ------------------------------------------------------
>
>                 Key: MYFACES-1790
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1790
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions:  1.2.0
>            Reporter: Cameron Bateman
>            Assignee: Matthias Weßendorf
>             Fix For: 1.2.1
>
>
> According to the spec, the component type of the default h:column tag is supposed to be "javax.faces.Column", however HtmlColumnTag returns "javax.faces.HtmlColumn".

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


[jira] Resolved: (MYFACES-1790) HtmlColumnTag.getComponentType returns the wrong value

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

Leonardo Uribe resolved MYFACES-1790.
-------------------------------------

    Resolution: Fixed

fixed at revision 612591

> HtmlColumnTag.getComponentType returns the wrong value
> ------------------------------------------------------
>
>                 Key: MYFACES-1790
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1790
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions:  1.2.0
>            Reporter: Cameron Bateman
>            Assignee: Matthias Weßendorf
>             Fix For: 1.2.1
>
>
> According to the spec, the component type of the default h:column tag is supposed to be "javax.faces.Column", however HtmlColumnTag returns "javax.faces.HtmlColumn".

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


[jira] Commented: (MYFACES-1790) HtmlColumnTag.getComponentType returns the wrong value

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

Leonardo Uribe commented on MYFACES-1790:
-----------------------------------------

deffered to 1.2.2 because it's necessary to release maven-faces-plugins for this issue only

> HtmlColumnTag.getComponentType returns the wrong value
> ------------------------------------------------------
>
>                 Key: MYFACES-1790
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1790
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions:  1.2.0
>            Reporter: Cameron Bateman
>            Assignee: Matthias Weßendorf
>             Fix For: 1.2.2-SNAPSHOT
>
>
> According to the spec, the component type of the default h:column tag is supposed to be "javax.faces.Column", however HtmlColumnTag returns "javax.faces.HtmlColumn".

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


[jira] Commented: (MYFACES-1790) HtmlColumnTag.getComponentType returns the wrong value

Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12553276 ] 

Matthias Weßendorf commented on MYFACES-1790:
---------------------------------------------

thanks Cameron,
I'll fix it inside the maven-faces-plugins

> HtmlColumnTag.getComponentType returns the wrong value
> ------------------------------------------------------
>
>                 Key: MYFACES-1790
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1790
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions:  1.2.0
>            Reporter: Cameron Bateman
>            Assignee: Matthias Weßendorf
>
> According to the spec, the component type of the default h:column tag is supposed to be "javax.faces.Column", however HtmlColumnTag returns "javax.faces.HtmlColumn".

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


[jira] Commented: (MYFACES-1790) HtmlColumnTag.getComponentType returns the wrong value

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

Leonardo Uribe commented on MYFACES-1790:
-----------------------------------------

added in vote trinidad-build for fix this issue on 1.2.1 release

> HtmlColumnTag.getComponentType returns the wrong value
> ------------------------------------------------------
>
>                 Key: MYFACES-1790
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1790
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions:  1.2.0
>            Reporter: Cameron Bateman
>            Assignee: Matthias Weßendorf
>             Fix For: 1.2.1
>
>
> According to the spec, the component type of the default h:column tag is supposed to be "javax.faces.Column", however HtmlColumnTag returns "javax.faces.HtmlColumn".

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


[jira] Commented: (MYFACES-1790) HtmlColumnTag.getComponentType returns the wrong value

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

Leonardo Uribe commented on MYFACES-1790:
-----------------------------------------

Hi

Checking one test for h:column headerClass and footerClass (a test for see if  issue 4 of JSR 252), after MYFACES-1790 previous fixes
does not work.

The change from javax.faces.HtmlColumn to javax.faces.Column let this code on shared without effect:

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();
            }

            .........


I don't like what spec says (it's just my opinion), because in runtime HtmlColumn is never used!.

Testing this against facelets, this library creates UIColumn instances.

Anyway the solution is to make this:

    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();
            }else{
                //This code corrects MYFACES-1790, because HtmlColumnTag
                //has as component type javax.faces.Column, so as side
                //effect it not create HtmlColumn, it create UIColumn
                //classes.
                UIColumn column = (UIColumn) uiComponent;                
                if (isHeader){
                    String headerClass = (String) column.getAttributes().get("headerClass");
                    if (headerClass != null){
                        styleClass = (String) headerClass;
                    }
                }else{
                    String footerClass = (String) column.getAttributes().get("footerClass");
                    if (footerClass != null){
                        styleClass = (String) footerClass;
                    }
                }
            }

           ......................

I have tested this in both environments (pure myfaces and facelets) and works well.


> HtmlColumnTag.getComponentType returns the wrong value
> ------------------------------------------------------
>
>                 Key: MYFACES-1790
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1790
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions:  1.2.0
>            Reporter: Cameron Bateman
>            Assignee: Matthias Weßendorf
>             Fix For: 1.2.1
>
>
> According to the spec, the component type of the default h:column tag is supposed to be "javax.faces.Column", however HtmlColumnTag returns "javax.faces.HtmlColumn".

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


[jira] Reopened: (MYFACES-1790) HtmlColumnTag.getComponentType returns the wrong value

Posted by "Mario Ivankovits (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mario Ivankovits reopened MYFACES-1790:
---------------------------------------


This fixed broke the HtmlColumn component as now it tag creates a UIColumn component instead of a HtmlColumn

> HtmlColumnTag.getComponentType returns the wrong value
> ------------------------------------------------------
>
>                 Key: MYFACES-1790
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1790
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions:  1.2.0
>            Reporter: Cameron Bateman
>            Assignee: Matthias Weßendorf
>             Fix For: 1.2.1
>
>
> According to the spec, the component type of the default h:column tag is supposed to be "javax.faces.Column", however HtmlColumnTag returns "javax.faces.HtmlColumn".

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


[jira] Resolved: (MYFACES-1790) HtmlColumnTag.getComponentType returns the wrong value

Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthias Weßendorf resolved MYFACES-1790.
-----------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.2.1-SNAPSHOT

> HtmlColumnTag.getComponentType returns the wrong value
> ------------------------------------------------------
>
>                 Key: MYFACES-1790
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1790
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions:  1.2.0
>            Reporter: Cameron Bateman
>            Assignee: Matthias Weßendorf
>             Fix For: 1.2.1-SNAPSHOT
>
>
> According to the spec, the component type of the default h:column tag is supposed to be "javax.faces.Column", however HtmlColumnTag returns "javax.faces.HtmlColumn".

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