You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by David Kaufman <da...@gmx.de> on 2015/04/13 11:26:50 UTC

Concering Borders in Wicket 6

Hi,

I'm currently migration our border classes from Wicket 1.4 to Wicket 6. I'm
not quite sure if I understand the change correctly.

We have markup that looks something like this:

</head>
<body>
    <wicket:border>
    <div class="layer1">
    <wicket:container wicket:id="container1" />
        <div class="layer2">
       <wicket:container wicket:id="container2" />
       <wicket:body />
        </div>
    </div>
    </wicket:border>
</body>
</html>

Is it sufficient to call the constructor of the border, i.e. super("id",
model), although the body is not a direct descendant? Since there is no
enclosing wicket component around the border, (except the border itself), I
don't have to be concerned about adding any container to the border. Is
this assumption correct?

Thanks
-David

Re: Concering Borders in Wicket 6

Posted by David Kaufman <da...@gmx.de>.
Thanks Martin! That was the explanation that I expected.

Thanks a lot,
David

2015-04-14 10:42 GMT+02:00 Martin Grigorov <mg...@apache.org>:

> Hi,
>
> Your description is a bit confusing/unclear.
> The markup looks OK to me.
> YourBorder should add container1 and container2 components.
> Any user of YourBorder will add children components to the border body.
> In HTML terms the body is not direct descendant (because <div
> class="layer2"> is in between) but for Wicket it is direct descendant
> because there is no Wicket component that is both a child of the Border and
> a parent of the Border's BodyContainer.
>
> Martin Grigorov
> Freelancer, available for hire!
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Mon, Apr 13, 2015 at 12:26 PM, David Kaufman <da...@gmx.de>
> wrote:
>
> > Hi,
> >
> > I'm currently migration our border classes from Wicket 1.4 to Wicket 6.
> I'm
> > not quite sure if I understand the change correctly.
> >
> > We have markup that looks something like this:
> >
> > </head>
> > <body>
> >     <wicket:border>
> >     <div class="layer1">
> >     <wicket:container wicket:id="container1" />
> >         <div class="layer2">
> >        <wicket:container wicket:id="container2" />u
> >        <wicket:body />
> >         </div>
> >     </div>
> >     </wicket:border>
> > </body>
> > </html>
> >
> > Is it sufficient to call the constructor of the border, i.e. super("id",
> > model), although the body is not a direct descendant? Since there is no
> > enclosing wicket component around the border, (except the border
> itself), I
> > don't have to be concerned about adding any container to the border. Is
> > this assumption correct?
> >
> > Thanks
> > -David
> >
>

Re: Concering Borders in Wicket 6

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Your description is a bit confusing/unclear.
The markup looks OK to me.
YourBorder should add container1 and container2 components.
Any user of YourBorder will add children components to the border body.
In HTML terms the body is not direct descendant (because <div
class="layer2"> is in between) but for Wicket it is direct descendant
because there is no Wicket component that is both a child of the Border and
a parent of the Border's BodyContainer.

Martin Grigorov
Freelancer, available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Apr 13, 2015 at 12:26 PM, David Kaufman <da...@gmx.de>
wrote:

> Hi,
>
> I'm currently migration our border classes from Wicket 1.4 to Wicket 6. I'm
> not quite sure if I understand the change correctly.
>
> We have markup that looks something like this:
>
> </head>
> <body>
>     <wicket:border>
>     <div class="layer1">
>     <wicket:container wicket:id="container1" />
>         <div class="layer2">
>        <wicket:container wicket:id="container2" />u
>        <wicket:body />
>         </div>
>     </div>
>     </wicket:border>
> </body>
> </html>
>
> Is it sufficient to call the constructor of the border, i.e. super("id",
> model), although the body is not a direct descendant? Since there is no
> enclosing wicket component around the border, (except the border itself), I
> don't have to be concerned about adding any container to the border. Is
> this assumption correct?
>
> Thanks
> -David
>