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

Martin Grigorov reassigned WICKET-5580:
---------------------------------------

    Assignee: Martin Grigorov

> Allow markup to find child fragments when wicket:child is inside a component 
> tag
> --------------------------------------------------------------------------------
>
>                 Key: WICKET-5580
>                 URL: https://issues.apache.org/jira/browse/WICKET-5580
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 6.15.0
>            Reporter: Jesse Long
>            Assignee: Martin Grigorov
>            Priority: Minor
>         Attachments: WICKET-5580.patch
>
>
> Sometimes we put <wicket:child/> inside the body of a component tag. This 
> when we must surround the body of the subclass (ie. between <wicket:extend>) 
> with some component or attribute modifier.
> In the interests of separation of concerns, we must allow the subclass to 
> continue working as though there were no Component surrounding its body. We 
> should not require the subclass to start worrying about the exact 
> implementation of the super class.
> We achieve this by making the component surrounding the subclass body 
> transparent, allowing the subclass to use add() directly as per usual.
> However, sometimes this causes problems. When rendering a component inside 
> the transparent component surrounding the subclass body during an Ajax 
> response, the markup for the component being rendered cannot be found, as 
> described in WICKET-5569.
> Also, fragments inside the <wicket:extend> of the subclass cannot be found 
> for similar reasons, with no work around.
> These problems arise from the implementation of Markup#find() and 
> MarkupFragment#find(). Both, when they encounter a component tag, skip to the 
> closing tag for the component tag. This is because we do not want to find 
> grandchildren in the markup hierarchy, only direct children.
> However, this is not always the correct behavior, because children can be top 
> level component tags, as well as component tags which are direct children of 
> <wicket:extend>, however deep in the hierarchy <wicket:extend> happens to be.
> We should therefore change Markup#find() and MarkupFragment#find() to also 
> find component tags which are the direct children of <wicket:extend>.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to