You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2014/09/19 15:46:34 UTC

[jira] [Commented] (WICKET-5580) Allow markup to find child fragments when wicket:child is inside a component tag

    [ https://issues.apache.org/jira/browse/WICKET-5580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14140487#comment-14140487 ] 

Martin Grigorov commented on WICKET-5580:
-----------------------------------------

Linked to WICKET-5704.

> 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
>             Fix For: 6.16.0, 7.0.0-M2
>
>         Attachments: WICKET-5580-2.patch, 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.3.4#6332)