Re: Extremely confisung onBeforeRender/callOnBeforeRenderIfNotVisible behavior

2008-11-20 Thread Matej Knopp
That's first confusing point. Javadocs on callOnBeforeRenderIfNotVisible promise us that onBeforeRender will be called even if component is not visible, but it is a lie. Bad, bad javadoc! -Matej - To unsubscribe, e-mail:

Re: Extremely confisung onBeforeRender/callOnBeforeRenderIfNotVisible behavior

2008-11-20 Thread Marat Radchenko
So. Is there any recommended (and hopefully not error-prone) way of handling conditional visibility? 2008/11/20 Matej Knopp [EMAIL PROTECTED]: That's first confusing point. Javadocs on callOnBeforeRenderIfNotVisible promise us that onBeforeRender will be called even if component is not

Re: Extremely confisung onBeforeRender/callOnBeforeRenderIfNotVisible behavior

2008-11-20 Thread Igor Vaynberg
you havent actually described your usecase yet... -igor On Thu, Nov 20, 2008 at 7:33 AM, Marat Radchenko [EMAIL PROTECTED] wrote: So. Is there any recommended (and hopefully not error-prone) way of handling conditional visibility? 2008/11/20 Matej Knopp [EMAIL PROTECTED]: That's first

Re: Extremely confisung onBeforeRender/callOnBeforeRenderIfNotVisible behavior

2008-11-20 Thread Jeremy Thomerson
Like this? new YourComponent(id) { @Override public boolean isVisible() { return yourCondition; } } On Thu, Nov 20, 2008 at 9:33 AM, Marat Radchenko [EMAIL PROTECTED] wrote: So. Is there any recommended (and hopefully not error-prone) way of handling conditional

Re: Extremely confisung onBeforeRender/callOnBeforeRenderIfNotVisible behavior

2008-11-20 Thread Marat Radchenko
That's bad because isVisible is invoked many times (50+ sometimes) per request so no complex logic can be put there. 2008/11/20 Jeremy Thomerson [EMAIL PROTECTED]: Like this? new YourComponent(id) { @Override public boolean isVisible() { return yourCondition; } } On Thu,

Re: Extremely confisung onBeforeRender/callOnBeforeRenderIfNotVisible behavior

2008-11-20 Thread Marat Radchenko
I'm trying to choose strategy for handling conditional component visibility (and we have complex tree where many components are conditionally visible). Overriding isVisible is bad, because many calls. overriding onBeforeRender and callOnBeforeRender is bad, because children visibility is

Re: Extremely confisung onBeforeRender/callOnBeforeRenderIfNotVisible behavior

2008-11-20 Thread Igor Vaynberg
i still dont see a concrete usecase -igor On Thu, Nov 20, 2008 at 8:04 AM, Marat Radchenko [EMAIL PROTECTED] wrote: I'm trying to choose strategy for handling conditional component visibility (and we have complex tree where many components are conditionally visible). Overriding isVisible is

Re: Extremely confisung onBeforeRender/callOnBeforeRenderIfNotVisible behavior

2008-11-20 Thread Matej Knopp
private Boolean visible = null; public boolean isVisible() { if (visible == null) { visible = [ put your complicated logic here]; } return visible; } public void onDetach() { super.onDetach(); visible = null; } What's wrong with this? -Matej On Thu, Nov 20, 2008 at 5:04 PM,