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:
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
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
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
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,
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
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
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,