You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Kennard Consulting (JIRA)" <de...@myfaces.apache.org> on 2011/08/29 08:18:37 UTC

[jira] [Created] (MYFACES-3293) REGRESSION: 2.0.5->2.0.6: RendererUtils.renderChild no longer checks isRendered

REGRESSION: 2.0.5->2.0.6: RendererUtils.renderChild no longer checks isRendered
-------------------------------------------------------------------------------

                 Key: MYFACES-3293
                 URL: https://issues.apache.org/jira/browse/MYFACES-3293
             Project: MyFaces Core
          Issue Type: Bug
    Affects Versions: 2.0.7, 2.0.6
            Reporter: Kennard Consulting


Hi guys,

Thanks for all the work you do on MyFaces. It is such a robust JSF implementation.

There appears to have been a regression between 2.0.5 and 2.0.6/2.0.7? Specifically, RendererUtils.renderChild no longer does an 'upfront' check of whether a UIComponent is rendered or not. This logic appears flawed if the UIComponent does *not* render its own children (the default in Renderer.getRendersChildren)?

First, encodeBegin/encodeEnd for the UIComponent will skip (the default in UIComponentBase.encodeBegin). But encodeChildren for the UIComponent will not get called (because getRendersChildren is false), so the UIComponent has no opportunity to prevent rendering of its children. Instead RendererUtils will invoke encodeBegin/encodeEnd on each child directly. So if a rendered component is nested inside a non-rendered component, it will still appear.

Surely there is an implication that even if I elect not to render my own children (i.e. I let JSF handle it), they should not get rendered if I myself am not rendered?

I enclose a small project that demonstrates the issue. Hopefully it is sufficient to debug. If not I can try and untangle it from Metawidget.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (MYFACES-3293) REGRESSION: 2.0.5->2.0.6: RendererUtils.renderChild no longer checks isRendered

Posted by "Martin Kočí (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13092719#comment-13092719 ] 

Martin Kočí commented on MYFACES-3293:
--------------------------------------

Hi, 
this was bug MYFACES-3126 I think, it should be fixed in 2.0.8  (even for the rendered="#{component}" case). Can you try 2.0.8 (just released), please?

> REGRESSION: 2.0.5->2.0.6: RendererUtils.renderChild no longer checks isRendered
> -------------------------------------------------------------------------------
>
>                 Key: MYFACES-3293
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3293
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.0.6, 2.0.7
>            Reporter: Kennard Consulting
>         Attachments: addressbook-faces2-src.zip, addressbook-faces2.war
>
>
> Hi guys,
> Thanks for all the work you do on MyFaces. It is such a robust JSF implementation.
> There appears to have been a regression between 2.0.5 and 2.0.6/2.0.7? Specifically, RendererUtils.renderChild no longer does an 'upfront' check of whether a UIComponent is rendered or not. This logic appears flawed if the UIComponent does *not* render its own children (the default in Renderer.getRendersChildren)?
> First, encodeBegin/encodeEnd for the UIComponent will skip (the default in UIComponentBase.encodeBegin). But encodeChildren for the UIComponent will not get called (because getRendersChildren is false), so the UIComponent has no opportunity to prevent rendering of its children. Instead RendererUtils will invoke encodeBegin/encodeEnd on each child directly. So if a rendered component is nested inside a non-rendered component, it will still appear.
> Surely there is an implication that even if I elect not to render my own children (i.e. I let JSF handle it), they should not get rendered if I myself am not rendered?
> I enclose a small project that demonstrates the issue. Hopefully it is sufficient to debug. If not I can try and untangle it from Metawidget.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (MYFACES-3293) REGRESSION: 2.0.5->2.0.6: RendererUtils.renderChild no longer checks isRendered

Posted by "Martin Kočí (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13092800#comment-13092800 ] 

Martin Kočí commented on MYFACES-3293:
--------------------------------------

Hi, this is another problem, probably related to state saving, please create new issue for that, there were changes in state saving (master bug MYFACES-3117)

> REGRESSION: 2.0.5->2.0.6: RendererUtils.renderChild no longer checks isRendered
> -------------------------------------------------------------------------------
>
>                 Key: MYFACES-3293
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3293
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.0.6, 2.0.7
>            Reporter: Kennard Consulting
>         Attachments: addressbook-faces2-src.zip, addressbook-faces2.war, addressbook-faces2.war
>
>
> Hi guys,
> Thanks for all the work you do on MyFaces. It is such a robust JSF implementation.
> There appears to have been a regression between 2.0.5 and 2.0.6/2.0.7? Specifically, RendererUtils.renderChild no longer does an 'upfront' check of whether a UIComponent is rendered or not. This logic appears flawed if the UIComponent does *not* render its own children (the default in Renderer.getRendersChildren)?
> First, encodeBegin/encodeEnd for the UIComponent will skip (the default in UIComponentBase.encodeBegin). But encodeChildren for the UIComponent will not get called (because getRendersChildren is false), so the UIComponent has no opportunity to prevent rendering of its children. Instead RendererUtils will invoke encodeBegin/encodeEnd on each child directly. So if a rendered component is nested inside a non-rendered component, it will still appear.
> Surely there is an implication that even if I elect not to render my own children (i.e. I let JSF handle it), they should not get rendered if I myself am not rendered?
> I enclose a small project that demonstrates the issue. Hopefully it is sufficient to debug. If not I can try and untangle it from Metawidget.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (MYFACES-3293) REGRESSION: 2.0.5->2.0.6: RendererUtils.renderChild no longer checks isRendered

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

Kennard Consulting commented on MYFACES-3293:
---------------------------------------------

Agreed.

> REGRESSION: 2.0.5->2.0.6: RendererUtils.renderChild no longer checks isRendered
> -------------------------------------------------------------------------------
>
>                 Key: MYFACES-3293
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3293
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.0.6, 2.0.7
>            Reporter: Kennard Consulting
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.8, 2.1.2
>
>         Attachments: addressbook-faces2-src.zip, addressbook-faces2.war, addressbook-faces2.war
>
>
> Hi guys,
> Thanks for all the work you do on MyFaces. It is such a robust JSF implementation.
> There appears to have been a regression between 2.0.5 and 2.0.6/2.0.7? Specifically, RendererUtils.renderChild no longer does an 'upfront' check of whether a UIComponent is rendered or not. This logic appears flawed if the UIComponent does *not* render its own children (the default in Renderer.getRendersChildren)?
> First, encodeBegin/encodeEnd for the UIComponent will skip (the default in UIComponentBase.encodeBegin). But encodeChildren for the UIComponent will not get called (because getRendersChildren is false), so the UIComponent has no opportunity to prevent rendering of its children. Instead RendererUtils will invoke encodeBegin/encodeEnd on each child directly. So if a rendered component is nested inside a non-rendered component, it will still appear.
> Surely there is an implication that even if I elect not to render my own children (i.e. I let JSF handle it), they should not get rendered if I myself am not rendered?
> I enclose a small project that demonstrates the issue. Hopefully it is sufficient to debug. If not I can try and untangle it from Metawidget.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (MYFACES-3293) REGRESSION: 2.0.5->2.0.6: RendererUtils.renderChild no longer checks isRendered

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

Leonardo Uribe commented on MYFACES-3293:
-----------------------------------------

This one and MYFACES-3294 are different issues. Checking this one, it was fixed on MYFACES-3126, which was included on 2.0.8/2.1.2. I'll close this one as fixed on 2.0.8/2.1.2

> REGRESSION: 2.0.5->2.0.6: RendererUtils.renderChild no longer checks isRendered
> -------------------------------------------------------------------------------
>
>                 Key: MYFACES-3293
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3293
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.0.6, 2.0.7
>            Reporter: Kennard Consulting
>             Fix For: 2.0.8, 2.1.2
>
>         Attachments: addressbook-faces2-src.zip, addressbook-faces2.war, addressbook-faces2.war
>
>
> Hi guys,
> Thanks for all the work you do on MyFaces. It is such a robust JSF implementation.
> There appears to have been a regression between 2.0.5 and 2.0.6/2.0.7? Specifically, RendererUtils.renderChild no longer does an 'upfront' check of whether a UIComponent is rendered or not. This logic appears flawed if the UIComponent does *not* render its own children (the default in Renderer.getRendersChildren)?
> First, encodeBegin/encodeEnd for the UIComponent will skip (the default in UIComponentBase.encodeBegin). But encodeChildren for the UIComponent will not get called (because getRendersChildren is false), so the UIComponent has no opportunity to prevent rendering of its children. Instead RendererUtils will invoke encodeBegin/encodeEnd on each child directly. So if a rendered component is nested inside a non-rendered component, it will still appear.
> Surely there is an implication that even if I elect not to render my own children (i.e. I let JSF handle it), they should not get rendered if I myself am not rendered?
> I enclose a small project that demonstrates the issue. Hopefully it is sufficient to debug. If not I can try and untangle it from Metawidget.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (MYFACES-3293) REGRESSION: 2.0.5->2.0.6: RendererUtils.renderChild no longer checks isRendered

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

Kennard Consulting commented on MYFACES-3293:
---------------------------------------------

Martin,

Thanks for your fast response! It does indeed sound like the same bug, and it seems to fix the problem.

I say 'seems to' because something very strange happens instead! Please see attached sample project. To reproduce:

1. Deploy the WAR
2. Click 'Add Personal Contact'
3. Click 'Save' (without entering any values, therefore getting a validation error)
4. Upon validation error, note CSS styles have disappeared from many parts of the XHTML! In particular around the table
5. Switch the 2.0.8 JARs for 2.0.7, and it works fine

Please confirm if you can reproduce, and whether I should open a new JIRA or whether it is related to the previous fix?

Regards,

Richard.

> REGRESSION: 2.0.5->2.0.6: RendererUtils.renderChild no longer checks isRendered
> -------------------------------------------------------------------------------
>
>                 Key: MYFACES-3293
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3293
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.0.6, 2.0.7
>            Reporter: Kennard Consulting
>         Attachments: addressbook-faces2-src.zip, addressbook-faces2.war
>
>
> Hi guys,
> Thanks for all the work you do on MyFaces. It is such a robust JSF implementation.
> There appears to have been a regression between 2.0.5 and 2.0.6/2.0.7? Specifically, RendererUtils.renderChild no longer does an 'upfront' check of whether a UIComponent is rendered or not. This logic appears flawed if the UIComponent does *not* render its own children (the default in Renderer.getRendersChildren)?
> First, encodeBegin/encodeEnd for the UIComponent will skip (the default in UIComponentBase.encodeBegin). But encodeChildren for the UIComponent will not get called (because getRendersChildren is false), so the UIComponent has no opportunity to prevent rendering of its children. Instead RendererUtils will invoke encodeBegin/encodeEnd on each child directly. So if a rendered component is nested inside a non-rendered component, it will still appear.
> Surely there is an implication that even if I elect not to render my own children (i.e. I let JSF handle it), they should not get rendered if I myself am not rendered?
> I enclose a small project that demonstrates the issue. Hopefully it is sufficient to debug. If not I can try and untangle it from Metawidget.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (MYFACES-3293) REGRESSION: 2.0.5->2.0.6: RendererUtils.renderChild no longer checks isRendered

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

Kennard Consulting commented on MYFACES-3293:
---------------------------------------------

Okay great. Now opened as MYFACES-3294.

> REGRESSION: 2.0.5->2.0.6: RendererUtils.renderChild no longer checks isRendered
> -------------------------------------------------------------------------------
>
>                 Key: MYFACES-3293
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3293
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.0.6, 2.0.7
>            Reporter: Kennard Consulting
>         Attachments: addressbook-faces2-src.zip, addressbook-faces2.war, addressbook-faces2.war
>
>
> Hi guys,
> Thanks for all the work you do on MyFaces. It is such a robust JSF implementation.
> There appears to have been a regression between 2.0.5 and 2.0.6/2.0.7? Specifically, RendererUtils.renderChild no longer does an 'upfront' check of whether a UIComponent is rendered or not. This logic appears flawed if the UIComponent does *not* render its own children (the default in Renderer.getRendersChildren)?
> First, encodeBegin/encodeEnd for the UIComponent will skip (the default in UIComponentBase.encodeBegin). But encodeChildren for the UIComponent will not get called (because getRendersChildren is false), so the UIComponent has no opportunity to prevent rendering of its children. Instead RendererUtils will invoke encodeBegin/encodeEnd on each child directly. So if a rendered component is nested inside a non-rendered component, it will still appear.
> Surely there is an implication that even if I elect not to render my own children (i.e. I let JSF handle it), they should not get rendered if I myself am not rendered?
> I enclose a small project that demonstrates the issue. Hopefully it is sufficient to debug. If not I can try and untangle it from Metawidget.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira