the window has a WindowClosedCallback you can use to refresh the appropriate part of the page once the window has been closed.
-igor On Fri, Sep 23, 2011 at 8:48 AM, Chris Merrill <ch...@webperformance.com> wrote: > In my short time with Wicket, I've found that whenever something seems really > hard, I'm probably doing it wrong :> I'm hoping this is such a case. > > > We have a number of components that are used on multiple pages. They are > pretty > simple - typically a couple of form field linked together for data entry. > > Sometimes we want one of those to appear in a ModalWindow, coupled with > Ok/Cancel > buttons and then update part of the page when the user accepts a change. > I am able to make this work, but it is pretty cumbersome. I first have to > put the component into a panel with the ok and cancel buttons. The panel has > to > know about the part of the page that needs to be refreshed. And it has to know > about the component embedded within it, in order to pass the selection back > to the page. This has to be done for each component we want inside a modal > ok/cancel > window. > > I found one article on a reusable ModalWindow pattern: > http://stuq.nl/weblog/2008-06-05/wicket-how-to-write-a-reusable-modal-window-popup > that helped a bit. My next step was to try to put the ok/cancel buttons into > my ModalWindow subclass, but I failed pretty miserably. I've done some more > digging > and now think I know how to make this work, but it seems like it will be more > than > a little convoluted. > > > Am I going about this all wrong? > > > > -- > ------------------------------------------------------------------------ - > Chris Merrill | Web Performance, Inc. > ch...@webperformance.com | http://webperformance.com > 919-433-1762 | 919-845-7601 > > Web Performance: Website Load Testing Software & Services > ------------------------------------------------------------------------ - > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org