[ 
https://issues.apache.org/jira/browse/TRINIDAD-2378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Scott O'Bryan resolved TRINIDAD-2378.
-------------------------------------

    Resolution: Fixed

r1470258 | bsullivan | 2013-04-21 03:25:49 +0000 | 3 lines
Changed paths:
   M 
/myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponent.java
   M 
/myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java
   M 
/myfaces/trinidad/trunk/trinidad-api/src/test/java/org/apache/myfaces/trinidad/component/ClientIdCachingTest.java
   M 
/myfaces/trinidad/trunk/trinidad-api/src/test/java/org/apache/myfaces/trinidad/render/RenderUtilsTest.java
   M 
/myfaces/trinidad/trunk/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/CoreRenderKitTest.java

[TRINIDAD-2378] UIXComponentBase should override clearCachedClientId to avoid 
calling getId() at times when the UIViewRoot isn't present

The current implementation of clearCachedClientIds on UIXComponent is final and 
always calls setId() with the result of getId(). The problem is that calling 
getId() requires a call to UIViewRoot.getUniqueId() if the component does not 
already have an id. Unfortunately, there are times when the UIViewRoot isn't 
attached to the FacesContext when we need to clear cached client ids. The 
easiest and fastest solution is to make clearCachedClientIds() non-final and 
allow UIXComponentBase to override the method to clear out its cached clientId 
directly.


> UIXComponentBase should override clearCachedClientId to avoid calling getId() 
> at times when the UIViewRoot isn't present
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TRINIDAD-2378
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-2378
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 2.1.0-core
>            Reporter: Blake Sullivan
>            Assignee: Blake Sullivan
>         Attachments: trin2378.diff
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> The current implementation of clearCachedClientIds on UIXComponent is final 
> and always calls setId() with the result of getId().  The problem is that 
> calling getId() requires a call to UIViewRoot.getUniqueId() if the component 
> does not already have an id.  Unfortunately, there are times when the 
> UIViewRoot isn't attached to the FacesContext when we need to clear cached 
> client ids.  The easiest and fastest solution is to make 
> clearCachedClientIds() non-final and allow UIXComponentBase to override the 
> method to clear out its cached clientId directly.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to