[ 
https://issues.apache.org/jira/browse/MYFACES-2774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12891454#action_12891454
 ] 

Leonardo Uribe commented on MYFACES-2774:
-----------------------------------------

I have an idea. Take a look at UIData.saveDescendantComponentStates or 
UIData.restoreDescendantComponentStates. It has an interesting algorithm that 
maybe we could apply in this case. Most of the times, the structure of the tree 
does not change, so an iterator will traverse the values in the same order. So, 
it is not really necessary a map. Maybe an simple array could do the job in a 
efficient way. Note if by some reason the component does not match we should 
traverse the whole array but in practice this will be done very few times.

If the component does not have any facets or children, maybe we can prevent 
create a new HashMap (or ArrayList) using a dummy static constant (maybe a 
integer like -1). 

> Remove MARK_DELETED attribute from the component
> ------------------------------------------------
>
>                 Key: MYFACES-2774
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2774
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: General, JSR-314
>    Affects Versions: 2.0.0
>            Reporter: Marius Petoi
>            Priority: Minor
>         Attachments: markDeletedFaceletContext.patch, 
> markDeletedFaceletContext2.patch, markDeletedFaceletContext3.patch
>
>
> The ComponentSupport.MARK_DELETED attribute is used only inside one request. 
> It doesn't need to be saved in the state. It should be removed from the 
> attributes of the component. Instead a list of components marked for deletion 
> should be included in the FaceletContext.

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

Reply via email to