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

Prakash Udupa updated TRINIDAD-2453:
------------------------------------

    Status: Patch Available  (was: Open)

> MoveChildComponentChange fails to apply document change for relocated 
> component case
> ------------------------------------------------------------------------------------
>
>                 Key: TRINIDAD-2453
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-2453
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>    Affects Versions: 2.1.0-core
>            Reporter: Prakash Udupa
>         Attachments: TRINIDAD-2453_over_trunk.patch
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> MoveChildComponentChange has documentation that all participants in the move 
> (child to move, the new parent at destination, common parent to both of 
> these) should belong to the same document.
> This is failing in relocated components usecase when the first two components 
> are in the same document, and when a common parent can be found in the same 
> document.
> For example consider this case:
> Template definition for template1 is as follows:
> <commonParent2>
>   <facet1-reference/> <!-- facet1 contents from the base page will be 
> relocated here -->
>   <facet2-reference/> <!-- facet2 contents from the base page will be 
> relocated here -->
> <commonParent2>
> Base Page (uses template1) definition is as follows:
> <commonParent1>
>   <template1> <!-- UIXInclude component -->
>     <facet1>
>       <componentToMove/>
>     </facet1>
>     <facet2>
>       <destinationContainer/>
>     </facet2>
>   </template1>
> </commonParent2>
> In this case the "componentToMove" and "destinationContainer" are defined in 
> the same document (Base Page), and the implementation in 
> MoveChildComponentChange can easily record "commonParent1" as the common 
> ancestor in which case all three participants belong to the same document and 
> so the move document change should be successful. Instead the issue is that 
> the implementation considers "commonParent2" as the common ancestor, this 
> component belongs to a different document (template1), and results in the 
> Move document change failing.
> I'll upload a patch that fixes this issue, and also cleans up the code in 
> MoveChildComponentChange to improve readability and make it easy to 
> understand.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to