Hi,

On Tue, May 26, 2015 at 10:35 AM, avchavan <[email protected]>
wrote:

> Hi,
> Is it possible to change the visibility of a component after page is
> rendered?
> Like when the page is loaded.
>
> I tried with:
>
>         @Override
>         public void onAfterRender(){
>                 super.onAfterRender();
>                 this.myComponent.setVisible(false);
>                 this.add(this.myComponent);
>

Doing this may break your application.
For example if myComponent has a link and the user clicks on this Link then
Wicket will fail to click on it because it is invisible.


>         }
>
> but i get an error:
> org.apache.wicket.WicketRuntimeException: Cannot modify component hierarchy
> after render phase has started (page version cant change then anymore)
>
> any workaround?
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Change-state-of-component-after-page-rendering-tp4670900.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to