Ah yes, stacking and nesting - looks good.

Some time back the Wicket dev (Igor or Sven?) who created the ModalDialog chatted to me about him planning to create ModalDialog - it sounded like a great idea. I am the developer of Wicketstuff ModalX library that aims to make the creation of Modal dialogs (using ModalWindow) in Wicket as easy and generic as it was in 90s era windowing desktop frameworks like Swing (Java), MFC and OWL (C++).

It looks like ModalDialog is a major improvement on ModalWindow.

One of the things ModalX did was to achieve a completely generic approach (at the markup and Java levels) whereby any modal could be opened from any component on any page without needing to add specific markup to any page or panel markup.

It did this with via an implementation of the ModalX ModalMgr which has an allocatedModalWindow and releaseModalWindow. An app's common base class Page would implement ModalMgr and establish a list (e.g. 5) of form objects wrapping ModalContentWindow objects used as placeholders for the generic modals - then any code, anywhere could pop up whatever dialog it wanted without that specific page or panel needing to have it's markup specifically changed to hold that dialog.

I guess ModalX's ModalMgr's allocated list of ModalContentWindowS is closest to the ModalDialog example's 'stacked' mode.

The ModalX ModalContentPanel extended Panel and had all the "smarts" to operate as a Modal panel within the context of a ModalMgr - e.g. automatically calling releaseModalWindow to effectively return the ModalContentWindow to the 'pool' when it was closed.

From what I can tell the aims of ModalX can now easily be achieved using the new ModalDialog class and either:

- ModalX is no longer needed for Wicket >= 9 (except for apps continuing to use ModalX via current ModalWindow implementation)
or
- ModalX could be reimplemented using ModalDialog so that existing projects using it can continue working without any code changes but using ModalDialog under the hood instead of ModalWindow.

I guess in the short term at least, as ModalWindow is deprecated and not removed, existing ModalX code will continue to work fine in Wicket 9.

Regards,

Chris



On 9/04/2021 2:20 pm, Martin Grigorov wrote:
Hi,

On Fri, Apr 9, 2021 at 6:39 AM Chris Colman <chr...@stepahead.com.au> wrote:

I have just noticed in Wicket 9 that ModalWindow has been deprecated and
replaced by ModalDialog (which sounds pretty good)

It is possible to stack ModalDialogS like we could stack ModalWindowS?

e.g. In a page a user opens a parent modal that has a "Details" button,
which, when clicked, pops up another ModalDialog over the parent
ModalDialog


The new example in Wicket-Examples module shows this.
https://examples9x.wicket.apache.org/ajax/modal-dialog




---------------------------------------------------------------------
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

Reply via email to