You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Nikita Tovstoles (JIRA)" <ji...@apache.org> on 2008/11/23 23:31:44 UTC

[jira] Updated: (WICKET-1954) Component.isVisibilityAllowed() not consulted before calling onBeforeRender()

     [ https://issues.apache.org/jira/browse/WICKET-1954?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nikita Tovstoles updated WICKET-1954:
-------------------------------------

    Description: 
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():

                if ((isVisible() || callOnBeforeRenderIfNotVisible()) && !getFlag(FLAG_RENDERING) &&
                        !getFlag(FLAG_PREPARED_FOR_RENDER))

be this:

                if ((determineVisibility() || callOnBeforeRenderIfNotVisible()) && !getFlag(FLAG_RENDERING) &&
                        !getFlag(FLAG_PREPARED_FOR_RENDER))


  was:
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():

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

be this:

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


> 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():
>                 if ((isVisible() || callOnBeforeRenderIfNotVisible()) && !getFlag(FLAG_RENDERING) &&
>                         !getFlag(FLAG_PREPARED_FOR_RENDER))
> be this:
>                 if ((determineVisibility() || callOnBeforeRenderIfNotVisible()) && !getFlag(FLAG_RENDERING) &&
>                         !getFlag(FLAG_PREPARED_FOR_RENDER))

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