Hello. Pardon me for jumping into this topic as I did not go through previous posts. But I did notice that the isVisible() is called at least three time when a page is rendered
I have a SQL call inside the method and the sql log shows
multiple sqls were issued.

I am running wicket 1.3.5. Sorry I could not provide sample to reproduce this.
but I did see it happening.


----- Original Message ----- From: "Erik van Oosten" <[email protected]>
To: <[email protected]>
Sent: Friday, January 16, 2009 4:18 AM
Subject: Re: Why you should not override isVisible


Martijn,

I just went through the source (1.4-rc1) to trace a detach manually and find suspect callers of isVisible. I found none during detach, but I did find one call to isVisible /after/ detach. A simple run confirmed this.

The call to isVisible /after/ detach can be found in method ComponentRequestTarget#respond(RequestCycle). That method initiates a detach and then calls page.endComponentRender. This leads to a call to Page#checkRendering which calls isVisibleInHierarchy() and from there isVisible(). Method checkRendering only does something when the debug setting 'componentUseCheck' is enabled (which according to the javadoc is true by default).

I vividly remember the pain when I found out that isVisible was called /during/ detach. So I am certain the problem existed at some time in the past (1.2, 1.3?). I can bang my head against the wall for not having documented the problem more thoroughly back then. Anyways, a call to isVisible /after/ detach has similar problems to a call during detach.

Regards,
   Erik.


Martijn Dashorst wrote:
A short test didn't uncover any calls to isVisible during detach phase
(1.4). Might need more extensive tests though...

Martijn

--
Erik van Oosten
http://day-to-day-stuff.blogspot.com/



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to