We reuse the dialog constantly, so i dont know what goes wrong for you. What does the javascript debug window tell you? Maybe the modal window some things that is is still shown
On 4/29/08, Marieke Vandamme <[EMAIL PROTECTED]> wrote: > > Hello, > Thanks for the reply. > But isn't it possible to reuse the modalwindow? Because in my application > the window needs to be opened many times, and I thought it would be better > to reuse the same window multiple times. Or has that no affect to the > memory-usage? > > > Cristi Manole wrote: > > > > I am 99% certain that if you change your code from : > > > > *final MyChooser myChooser = new MyChooser(modal);* > > *modal.setPageCreator(new ModalWindow.PageCreator() { > > public Page createPage() { > > return myChooser; > > } > > } > > * > > to this : > > > > *modal.setPageCreator(new ModalWindow.PageCreator() { > > public Page createPage() { > > return new MyChooser(modal); > > } > > } > > * > > it will work. > > > > Try it. > > Cristi Manole > > > > On Mon, Apr 28, 2008 at 1:07 PM, Marieke Vandamme <[EMAIL PROTECTED]> wrote: > > > >> > >> Hello, > >> > >> can't anyone help me with this problem? > >> If I need to code it differently, please tell me. > >> Thanks !! > >> > >> > >> Marieke Vandamme wrote: > >> > > >> > Hello, > >> > > >> > i'm having problems with the modal window. It shows up fine when I > >> click > >> > my link the first time, but after closing the window with the 'X', it > >> > won't open again. > >> > I don't know if I'm using it wrong or if it's a bug. > >> > Any help is welcome ! thanks. Marieke. > >> > > >> > My code : > >> > public class TestModalWindow extends WebPage { > >> > > >> > public TestModalWindow() { > >> > final ModalWindow modal = new ModalWindow("dataChooser"); > >> > add(modal); > >> > final MyChooser myChooser = new MyChooser(modal); > >> > modal.setPageCreator(new ModalWindow.PageCreator() { > >> > > >> > public Page createPage() { > >> > return myChooser; > >> > } > >> > }); > >> > > >> > add(new AjaxLink("lnkOpen") { > >> > > >> > public void onClick(AjaxRequestTarget target) { > >> > myChooser.reload(target); > >> > } > >> > }); > >> > } > >> > > >> > public class MyChooser extends WebPage { > >> > > >> > private ModalWindow window; > >> > > >> > public MyChooser(ModalWindow w) { > >> > this.window = w; > >> > } > >> > > >> > public void reload(AjaxRequestTarget target) { > >> > this.window.show(target); > >> > } > >> > } > >> > } > >> > > >> > >> -- > >> View this message in context: > >> > http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16935903.html > >> Sent from the Wicket - User mailing list archive at Nabble.com. > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16953499.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]