You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Anton Veretennikov <an...@gmail.com> on 2009/03/02 17:41:35 UTC

Another borders scenario

Hello!

I'm again with borders. May be I'm not using them right...
Is everything okey with this mix of border and child:

________________
Block.html:
    <wicket:panel>
      <div wicket:id="border">
        <wicket:child />
      </div>
    </wicket:panel>
________________
Block.java (extends Panel)
   add(new RoundedCornersPanelGrey("border"));

________________
ChildBlock.html:
    <wicket:extend>
      <a wicket:id="link">link</a>
    </wicket:extend>
________________
ChildBlock.java (extends Block)
   add(new Link("link")

It doesn't work with border in Block (can't find component).
It works only without border or with border in ChildBlock around <a>.

-- Tony.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Another borders scenario

Posted by Anton Veretennikov <an...@gmail.com>.
The only way I found is to hold reference to added border inside to be
extended class and to do

getBorder().add(new Link("link"));

in child constructor.

May be there exists better approach?

On Mon, Mar 2, 2009 at 11:41 PM, Anton Veretennikov
<an...@gmail.com> wrote:
> Hello!
>
> I'm again with borders. May be I'm not using them right...
> Is everything okey with this mix of border and child:
>
> ________________
> Block.html:
>    <wicket:panel>
>      <div wicket:id="border">
>        <wicket:child />
>      </div>
>    </wicket:panel>
> ________________
> Block.java (extends Panel)
>   add(new RoundedCornersPanelGrey("border"));
>
> ________________
> ChildBlock.html:
>    <wicket:extend>
>      <a wicket:id="link">link</a>
>    </wicket:extend>
> ________________
> ChildBlock.java (extends Block)
>   add(new Link("link")
>
> It doesn't work with border in Block (can't find component).
> It works only without border or with border in ChildBlock around <a>.
>
> -- Tony.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org