Details
Description
Interaction with t:inputCalendar proliferates commandLinks when runing under ICEFaces.
Issue Links
- blocks
-
ICE-1438 Tomahawk: commandLink proliferates when interacting with the calendar of t:schedule component
- Closed
Activity
Adnan Durrani
created issue -
Adnan Durrani
made changes -
Field | Original Value | New Value |
---|---|---|
Assignee | Adnan Durrani [ adnan.durrani ] |
Adnan Durrani
made changes -
Fix Version/s | 1.6DR#4 [ 10060 ] | |
Assignee Priority | P2 |
Adnan Durrani
made changes -
Adnan Durrani
made changes -
Status | Open [ 1 ] | In Progress [ 3 ] |
Ken Fyten
made changes -
Assignee Priority | P2 | P3 |
Ken Fyten
made changes -
Fix Version/s | 1.6 [ 10031 ] | |
Fix Version/s | 1.6DR#4 [ 10060 ] |
Adnan Durrani
made changes -
Status | In Progress [ 3 ] | Resolved [ 5 ] |
Fix Version/s | 1.6DR#5 [ 10071 ] | |
Fix Version/s | 1.6 [ 10031 ] | |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Fix Version/s | 1.6 [ 10031 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Assignee Priority | P3 | |
Assignee | Adnan Durrani [ adnan.durrani ] |
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 HtmlCalendar 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 rendering being completed. It would fix the problem with ICEFaces. The following is suggested change:
HtmlCalendarRenderer.java
public void encodeEnd(FacesContext facesContext, UIComponent component)
{ ..... ...... //As inputCalendar component does not have any other child except the one created during renderResponsePhase //So it is safe to make the following call component.getChildren().removeAll(component.getChildren()); }throws IOException
The above change has been tested with Myfaces and Myfaces + ICEFaces and everything works fine.