I've created a subclass of ModalWindow in which I can set from outside
the class of the page to be created. Then, I've created a WebPage subclass
that has one of that subclass of ModalWindow. So whenever I need modal
windows, I subclass that page and use the same modal window from all the
buttons and links, setting in each case the page that needs to be opened and
the callback.
In your case, perhaps you can use fragments to show only one link or
button at a time, depending on your model, and setting in each one what page
needs to be opened.
hth,
Daniel
Steve Swinsburg-2 wrote:
>
> 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
>
>
--
View this message in context:
http://www.nabble.com/different-modal-windows-from-same-link-or-just-multiple-links--tp21624404p21626868.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]