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
If you don't want the panels on there, put an EmptyPanel in their
place instead of making them invisible.
On Thu, Sep 25, 2008 at 10:08 AM, Markus Haspl [EMAIL PROTECTED] wrote:
hi,
i have a WebPage with a lot of Panels on it. Each Panel overrides the
isVisible() method because not every
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
call your init from this hook:
onbeforerender() {
if (!hasbeenrendered()) { init(); }
}
-igor
On Thu, Sep 25, 2008 at 7:08 AM, Markus Haspl [EMAIL PROTECTED] wrote:
hi,
i have a WebPage with a lot of Panels on it. Each Panel overrides the
isVisible() method because not every Panel should
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