You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Adnan Durrani (JIRA)" <de...@myfaces.apache.org> on 2007/04/20 19:24:15 UTC

[jira] Created: (TOMAHAWK-968) Interaction with inputCalendar component causes proliferation of commandLinks if running under ICEFaces.

Interaction with inputCalendar component causes proliferation of commandLinks if running under ICEFaces.
--------------------------------------------------------------------------------------------------------

                 Key: TOMAHAWK-968
                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-968
             Project: MyFaces Tomahawk
          Issue Type: Bug
          Components: Calendar
    Affects Versions: 1.1.5
         Environment: Myfaces + Tomahawk + ICEFaces
            Reporter: Adnan Durrani
             Fix For: 1.1.6-SNAPSHOT


In renderResponsePhase the HtmlCalendarRenderer adds as many new commandLinks as number of days in a month to the HtmlCalendar component, and then delegates rendering to its children, but it never removes them back after completion of the rendering, which is fine with myfaces but not if running with Myfaces + ICEFaces.

As Myfaces creates a new component tree during restoreView, so there is always a new instance of inputCalendar component with no existing children, while ICEFaces maintains the component tree for optimization to reduce the latency, so under ICEFaces the previously created component instance being used and it gets duplicate children in each and every renderResponsePhase. That is why rendered page shows proliferated commandLinks.

As decode has been managed by the HtmlCalendarRenderer itself, and commandLinks never required by any other phases so it would be safe to remove them when render completes. It would fix the problem with ICEFaces. The following is suggested change:

    HtmlCalendarRenderer.java    

    public void encodeEnd(FacesContext facesContext, UIComponent component)
            throws IOException
    {
         .....
         ......
         //As inputCalendar component does not have any other child except the one created during renderResponsePhase
         //So it is safe to remove all children
 	 component.getChildren().removeAll(component.getChildren());
    }

The above change has been tested with Myfaces and Myfaces + ICEFaces and everything works fine.

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


[jira] Commented: (TOMAHAWK-968) Interaction with inputCalendar component causes proliferation of commandLinks if running under ICEFaces.

Posted by "Mike Kienenberger (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12490413 ] 

Mike Kienenberger commented on TOMAHAWK-968:
--------------------------------------------

Sounds good.

I've seen at least one other related inputCalendar bug because of this.
Please submit your changes in the form of a unified diff.

http://wiki.apache.org/myfaces/Contributing_Patches

> Interaction with inputCalendar component causes proliferation of commandLinks if running under ICEFaces.
> --------------------------------------------------------------------------------------------------------
>
>                 Key: TOMAHAWK-968
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-968
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Calendar
>    Affects Versions: 1.1.5
>         Environment: Myfaces + Tomahawk + ICEFaces
>            Reporter: Adnan Durrani
>             Fix For: 1.1.6-SNAPSHOT
>
>
> In renderResponsePhase the HtmlCalendarRenderer adds as many new commandLinks as number of days in a month to the HtmlCalendar component, and then delegates rendering to its children, but it never removes them back after completion of the rendering, which is fine with myfaces but not if running with Myfaces + ICEFaces.
> As Myfaces creates a new component tree during restoreView, so there is always a new instance of inputCalendar component with no existing children, while ICEFaces maintains the component tree for optimization to reduce the latency, so under ICEFaces the previously created component instance being used and it gets duplicate children in each and every renderResponsePhase. That is why rendered page shows proliferated commandLinks.
> As decode has been managed by the HtmlCalendarRenderer itself, and commandLinks never required by any other phases so it would be safe to remove them when render completes. It would fix the problem with ICEFaces. The following is suggested change:
>     HtmlCalendarRenderer.java    
>     public void encodeEnd(FacesContext facesContext, UIComponent component)
>             throws IOException
>     {
>          .....
>          ......
>          //As inputCalendar component does not have any other child except the one created during renderResponsePhase
>          //So it is safe to remove all children
>  	 component.getChildren().removeAll(component.getChildren());
>     }
> The above change has been tested with Myfaces and Myfaces + ICEFaces and everything works fine.

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


[jira] Updated: (TOMAHAWK-968) Interaction with inputCalendar component causes proliferation of commandLinks if running under ICEFaces.

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

Adnan Durrani updated TOMAHAWK-968:
-----------------------------------

    Status: Patch Available  (was: Open)

> Interaction with inputCalendar component causes proliferation of commandLinks if running under ICEFaces.
> --------------------------------------------------------------------------------------------------------
>
>                 Key: TOMAHAWK-968
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-968
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Calendar
>    Affects Versions: 1.1.5
>         Environment: Myfaces + Tomahawk + ICEFaces
>            Reporter: Adnan Durrani
>             Fix For: 1.1.6-SNAPSHOT
>
>         Attachments: TOMAHAWK-968.patch
>
>
> In renderResponsePhase the HtmlCalendarRenderer adds as many new commandLinks as number of days in a month to the HtmlCalendar component, and then delegates rendering to its children, but it never removes them back after completion of the rendering, which is fine with myfaces but not if running with Myfaces + ICEFaces.
> As Myfaces creates a new component tree during restoreView, so there is always a new instance of inputCalendar component with no existing children, while ICEFaces maintains the component tree for optimization to reduce the latency, so under ICEFaces the previously created component instance being used and it gets duplicate children in each and every renderResponsePhase. That is why rendered page shows proliferated commandLinks.
> As decode has been managed by the HtmlCalendarRenderer itself, and commandLinks never required by any other phases so it would be safe to remove them when render completes. It would fix the problem with ICEFaces. The following is suggested change:
>     HtmlCalendarRenderer.java    
>     public void encodeEnd(FacesContext facesContext, UIComponent component)
>             throws IOException
>     {
>          .....
>          ......
>          //As inputCalendar component does not have any other child except the one created during renderResponsePhase
>          //So it is safe to remove all children
>  	 component.getChildren().removeAll(component.getChildren());
>     }
> The above change has been tested with Myfaces and Myfaces + ICEFaces and everything works fine.

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


[jira] Updated: (TOMAHAWK-968) Interaction with inputCalendar component causes proliferation of commandLinks if running under ICEFaces.

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

Grant Smith updated TOMAHAWK-968:
---------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

Patch applied. Thanks!

> Interaction with inputCalendar component causes proliferation of commandLinks if running under ICEFaces.
> --------------------------------------------------------------------------------------------------------
>
>                 Key: TOMAHAWK-968
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-968
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Calendar
>    Affects Versions: 1.1.5
>         Environment: Myfaces + Tomahawk + ICEFaces
>            Reporter: Adnan Durrani
>         Assigned To: Grant Smith
>             Fix For: 1.1.6-SNAPSHOT
>
>         Attachments: TOMAHAWK-968.patch
>
>
> In renderResponsePhase the HtmlCalendarRenderer adds as many new commandLinks as number of days in a month to the HtmlCalendar component, and then delegates rendering to its children, but it never removes them back after completion of the rendering, which is fine with myfaces but not if running with Myfaces + ICEFaces.
> As Myfaces creates a new component tree during restoreView, so there is always a new instance of inputCalendar component with no existing children, while ICEFaces maintains the component tree for optimization to reduce the latency, so under ICEFaces the previously created component instance being used and it gets duplicate children in each and every renderResponsePhase. That is why rendered page shows proliferated commandLinks.
> As decode has been managed by the HtmlCalendarRenderer itself, and commandLinks never required by any other phases so it would be safe to remove them when render completes. It would fix the problem with ICEFaces. The following is suggested change:
>     HtmlCalendarRenderer.java    
>     public void encodeEnd(FacesContext facesContext, UIComponent component)
>             throws IOException
>     {
>          .....
>          ......
>          //As inputCalendar component does not have any other child except the one created during renderResponsePhase
>          //So it is safe to remove all children
>  	 component.getChildren().removeAll(component.getChildren());
>     }
> The above change has been tested with Myfaces and Myfaces + ICEFaces and everything works fine.

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