You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Doug Leeper <do...@yahoo.com> on 2009/08/25 18:27:37 UTC

Replacing content in a ModalWindow issue

I have looked at the ModalWindow javadoc,  searched through Nabble, and tried several different approaches but I cannot do the following. 

I have a ModalWindow showing a Panel A.  This panel has a link that when selected, it is to show a ModalWindow with another Panel B.  Ideally, ModalWindow/Panel A should go away and a ModalWindow/Panel B should only be displayed.

I have tried to reuse the current ModalWindow and call through various combinations of setContent()/addOrReplaceComponent().  What results is that I have a ModalWindow showing Panel A and another ModalWindow showing Panel B.  I have even tried to Panel A.setVisible()/target.addComponent(modalWindow).

Does anyone know what I need to do to replace the content on a ModalWindow and only have one ModalWindow show?

Thanks in advance!

- Doug

Re: Replacing content in a ModalWindow issue

Posted by Martin Makundi <ma...@koodaripalvelut.com>.
Off the top of my head, you do not need anything special. Just show
the same modal window again after the callback. Unless the modal
window is cleaned up only after callbakc.

BTW: Why close the modal window in the first place? Why not just
replace the content while the modal window is open?

Just call setContent again and target.addComponent(contentPanel);

**
Martin

2009/8/25 Doug Leeper <do...@yahoo.com>:
> I have looked at the ModalWindow javadoc,  searched through Nabble, and tried several different approaches but I cannot do the following.
>
> I have a ModalWindow showing a Panel A.  This panel has a link that when selected, it is to show a ModalWindow with another Panel B.  Ideally, ModalWindow/Panel A should go away and a ModalWindow/Panel B should only be displayed.
>
> I have tried to reuse the current ModalWindow and call through various combinations of setContent()/addOrReplaceComponent().  What results is that I have a ModalWindow showing Panel A and another ModalWindow showing Panel B.  I have even tried to Panel A.setVisible()/target.addComponent(modalWindow).
>
> Does anyone know what I need to do to replace the content on a ModalWindow and only have one ModalWindow show?
>
> Thanks in advance!
>
> - Doug
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org