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