On Wed, Oct 15, 2014 at 5:40 PM, Andrea Del Bene <[email protected]> wrote:
> On 15/10/14 14:49, Martin Grigorov wrote: > >> Hi Andrea, >> >> On Wed, Oct 15, 2014 at 1:33 PM, <[email protected]> wrote: >> >> + * >>> + * @param component >>> + * The children markup container >>> + */ >>> + private void queueChildContainer(final Component component) >>> + { >>> + if (queue != null && !queue.isEmpty() && >>> + component instanceof MarkupContainer) >>> + { >>> + MarkupContainer childContainer = >>> (MarkupContainer)component; >>> + childContainer.queue(queue); >>> + } >>> + } >>> >>> /** >>> * @param component >>> @@ -1661,24 +1682,8 @@ public abstract class MarkupContainer extends >>> Component implements Iterable<Comp >>> { >>> Component component = (Component)child; >>> component.detach(); >>> - >>> - // We need to keep InlineEnclosures for >>> Ajax request handling. >>> - // TODO this is really ugly. Feature >>> request for 1.5: change auto-component that >>> - // they don't need to be removed anymore. >>> - if (!(component instanceof >>> InlineEnclosure) && component.isAuto()) >>> - { >>> - children_remove(i); >>> - } >>> >>> > auto components should be removed at the end of the rendering. >> what has changed so they can stay ? >> if add() is used then the auto components are resolved at rendering time >> with IComponentResolver, not with IAutoComponentFactory (as with queue()). >> > > To be honest I didn't know much about how auto components are handled. > Before resolving an auto component Wicket checks if it already exists in > the container hierarchy (line 1424), so I don't think it's dangerous if we > leave them. Have you in mind any case in which this behavior could be > dangerous? The first use case that pops up in my mind is producing broken listener interface urls. E.g. the url to a Link could be: 1-1.ILinkListener-table-topToolbars-toolbars-1-span-navigator-navigation-2-pageLink. Depending whether there is an auto component in the middle of the component path that has been removed until this change and is preserved now this path may lead to ComponentNotFoundException now. We need to test 7.x thoroughly before next release! > > >> >> } >>> } >>> - >>> - if (children instanceof ChildList) >>> - { >>> - ChildList lst = (ChildList)children; >>> - Object[] tmp = new Object[lst.size]; >>> - System.arraycopy(lst.childs, 0, tmp, 0, >>> lst.size); >>> - children = tmp; >>> - } >>> >>> I don't understand why this is no more needed too... >> >> >> This is removed since we don't remove auto components anymore. So it's > useless to rebuild children array. >
