[
https://issues.apache.org/jira/browse/WICKET-1560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Igor Vaynberg reassigned WICKET-1560:
-------------------------------------
Assignee: Matej Knopp (was: Gerolf Seitz)
> MarkupFragmentFinder fails on transparent resolvers within Repeaters
> --------------------------------------------------------------------
>
> Key: WICKET-1560
> URL: https://issues.apache.org/jira/browse/WICKET-1560
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.3.3, 1.4-M1
> Environment: Any
> Reporter: Jan Kriesten
> Assignee: Matej Knopp
> Priority: Critical
> Fix For: 1.3.4, 1.4-M2
>
>
> I extended the AjaxDataTable to be able to add Rows to certain states of the
> rows. However, MarkupFragmentFinder fails to resolve the code under this
> condition since it compares with the wrong components in this case:
> Markup:
> <wicket:container wicket:id="rows">
> <tr wicket:id="row"><td wicket:id="cells"><span
> wicket:id="cell">[cell]</span></td></tr>
> <tr wicket:id="action-row" class="actionRow"></tr>
> </wicket:container>
> 'row' is the transparent resolver in this case to maintain the hierarchy
> needed by the DataTable. MarkupFragmentFinder fails in the case of adding a
> cell to an AjaxRequestTarget.
> Fix:
> Everything works as expected, when MarkupFragmentFinder checks for the parent
> being an AbstractRepeater and in the case compares the parent.id with the
> supplied id (code provided by Gerolf):
> if (elem instanceof ComponentTag)
> {
> ComponentTag tag = (ComponentTag)elem;
> String id = tag.getId();
> if ((id != null) && id.equals(component.getId()))
> {
> // Ok, found it
> return markupStream;
> }
> else
> {
> Component parent = component.getParent();
> if (parent instanceof AbstractRepeater && id != null &&
> id.equals(parent.getId()))
> {
> return markupStream;
> }
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.