Ehm...

WOW?

Nice comeback!

I doubt that our company's applications would be a good test for this,
as our exposure to fragments is limited (I always found them too
cumbersome to use, and always opt for panels). I'd hope that someone
with a fancy for fragments would test this in their application(s).

In any case, we can add it to 8 and then it's available in m2. My
guess is that it is not hard to reverse if it were to cause
insurmountable problems (just a minor pain when folks need to revert
the id change).

Martijn


On Sat, Aug 20, 2016 at 6:02 AM, Pedro Santos <[email protected]> wrote:
> Hi devs,
>
> Wicket's container rendering creates a new component for each
> wicket:fragment it finds in the markup, and puts it in the component tree.
> This process has a few issues and I prose us to simplify it.
>
> issues:
>
> - the new component for the fragment can conflict with user's components
> since we need a wicket:id for it and we don't have a reserved namespace
> - can cause unexpected behaviours like a container with no children testing
> true for container.size() > 0
> - adds an unnecessary object in the tree
> - adds unnecessary complexity like custom component versioning (we are
> setting this component to be not versioned)
> - causes misleading exception messages since the fragment markup can be
> mistaken by an actual component markup
>
> My idea it to simple skip wicket:fragment's markup while rendering
> containers. The only place we need to load this markup inside the markup
> sourcing strategy when providing for a Fragment.
>
> The implications are to remove FragmentResolver and possible to change
> wicket:fragment tag's id attribute from wicket:id to fragment-id or id in
> Wicket 8.
>
> I see this as a non trivial internal change for Wicket 6 and 7, so I worked
> on a branch[1] to showcase the idea and to get your thoughts while
> resolving WICKET-6219 in wicket-7.x branch.
>
> cheers,
>
> Pedro Santos
>
> 1 - https://github.com/apache/wicket/tree/WICKET-6219-no-fragment-resolver



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com

Reply via email to