Component.isVisibilityAllowed() not consulted before calling onBeforeRender()
-----------------------------------------------------------------------------

                 Key: WICKET-1954
                 URL: https://issues.apache.org/jira/browse/WICKET-1954
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.3.5
            Reporter: Nikita Tovstoles


I have a component whose parent does this:

class Parent extends Panel

private Component child;

onBeforeRender()
{
child.setVisibilityAllowed(false);
super.onBeforeRender();
}

I would expect child's onBeforeRender() to not be executed but it is, because 
Component.internalBeforeRender calls isVisible() rather than 
determineVisibility().

Shouldn't the following line in Component.internalBeforeRender():

{code}

                if ((isVisible() || callOnBeforeRenderIfNotVisible()) && 
!getFlag(FLAG_RENDERING) &&
                        !getFlag(FLAG_PREPARED_FOR_RENDER))
{code}

be this:

{code}
                if ((determineVisibility() || callOnBeforeRenderIfNotVisible()) 
&& !getFlag(FLAG_RENDERING) &&
                        !getFlag(FLAG_PREPARED_FOR_RENDER))
{code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to