thank you eric! i will change the Overrides.


On Thu, Sep 25, 2008 at 5:09 PM, Erik van Oosten <[EMAIL PROTECTED]>wrote:

> Overriding isVisible can be quite evil. The problem is that it is called
> also in the detach phase. When isVisible depends on the model, your model is
> often reloaded!
>
> There are 2 solutions:
> - within method isVisible cache the result, clear the cache in the
> onDetach.
> - (recommended) don't override isVisible but do:
>
> @Override void onBeforeRender() {
>  setVisible(.....);
> }
> @Override boolean callOnBeforeRenderIfNotVisible() {
>  return true;
> }
>
> Regards,
>   Erik.
>
>
> Markus Haspl wrote:
>
>> hi,
>>
>> i have a WebPage with a lot of Panels on it. Each Panel overrides the
>> isVisible() method because not every Panel should be displayed on the
>> page.
>> The Problem is: the constructor of each Panel (also which aren't visible)
>> is
>> called and i have a lot of load on the server. So i tried to make a init()
>> method (add's all components to the panel) wich is only called when
>> isVisible==true, but then i get the errors that it couldn't find the
>> components on panelXX.
>>
>> thanks
>> markus
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to