The code of a constructor is executed only once, so after
setVisible(true) it will not be called again for other isTitle value
(this is not a model). Simply override isVisible of your border. It
will be called each time page is going to be rendered.

-- Tony

On Mon, Jul 20, 2009 at 6:27 AM, Fernando
Wermus<fernando.wer...@gmail.com> wrote:
> Hi all,
>
>     My use case consists in show a text as a title or as a link.
>
> I tried to solve this with a border
>
> boolean isTitle=true;
>
>
> H2Border border=new H2Border("border");
> Link link=new Link("link");
> H2border.add(link);
> link.setEnable(!isTitle);
> H2border.setVisible(isTitle);
> add(H2border);
>
> Because I thougth that,
>
> a invisible border doesn't make invisible its children. This is reasonable
> because a border is a decorator.
>
> Like I couldn't find out a way to set invisible the border but the link, I
> finally use method setBeforeDisabledLink which works because I am using a
> Link.
>
> Anyway, I would like to use a Border instead of this methods with the skill
> to make unvisible the border but not its children.
>
> How can I achieve this?
>
>
> Thanks in advance
>
> ps: I looked at border.setTransparentResolver(true) without any result.
>
> --
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>

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

Reply via email to