Hi Steve, Excuse me if i'm missing something...
Shouldn't you just provide different panels to the window, depending on your condition? That is, inside your onClick(), calling setContent(new YourPanel()); On the code you show, i don't see where you set the content to the window... are you doing it in advance? (that could be a bad idea). Regards, German 2009/1/23 Steve Swinsburg <[email protected]> > Hi all, > I have a situation where depending on some circumstances, any one of three > different modal windows could be activated by clicking a single link, which > itself changes. > > ie add/confirm/remove > > but only one can be visible at any one time. I don't want three links. Is > there any way to do this by setting the onClick handler of the AjaxLink that > normally just contains: > final AjaxLink connectionLink = new AjaxLink("connectionLink") { > public void onClick(AjaxRequestTarget target) { > connectionWindow.show(target); > } > }; > > to be dynamically set, ie connectionWindow.show(target); is set at a later > stage. > > Or will I just need multiple modal window placeholders and multiple links > and just show/hide the relevant ones? > > I would also need the connectionWindow.setWindowClosedCallback > to react differently based on which modal window was closed. > > Is there any point in what I am trying to do or should I just suck it up > and have three links/windows and control visibility? Will I achieve any > major performance hits by tripling everything? > > > cheers, > Steve > > > > > > >
