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);
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,
I cannot override it, it is final
On Sun, Jul 19, 2009 at 7:37 PM, Anton Veretennikov
anton.veretenni...@gmail.com wrote:
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, not setVisible
H2Border border=new H2Border(border) {
@Override
public boolean isVisible() {
return ...
}
};
Be aware it may be called several times during page rendering (look JavaDoc).
-- Tony
On Mon, Jul 20, 2009 at 10:48 AM, Fernando