ModalX for Wicket
 Previous: Download  Next: The Solutions

ModalX for Wicket

ModalX stands for "Modal eXtensions".

Wicket is one of the best Java User Interface frameworks available. We've been using it since 2006 and have never looked back.

The Wicketstuff library is designed to be a collections of enhancements that extend the Wicket framework with useful 'add ons'. ModalX is now part of the Wicketstuff library and is open source, released under the same Apache license.

ModalX is a small, elegant set of classes arranged in such a way that makes the creation and use of Modal Forms and Message Boxes in wicket just as easy as it was in the good old days of desktop development using MFC, OWL or Swing. Back in those days all you needed to do was derive from a ModalWindow class, add your 'extra' bits then simply instantiate the modal window and voila!

Please read on to discover what ModalX is, why it exists, play with a live demo and download it:

Modal Windows like you remember from the good old desktop days

Currently with Wicket (1.4.x, 1.5.x) modal windows are not as simple as they were in the desktop application development days. There's a bit of scaffolding to perform to make a modal window happen and there isn't the equivalent of a CDialog or TDialog that implements the convenience of the OK, Cancel button handling automatically for you. In the desktop world you simply derive a new form or modal dialog class from CDialog or TDialog then instantiate it.

MessageBox Convenience

The desktop world has the concept of a message box, implemented by a specific MessageBox class in most traditional desktop environments.

Reusable, invoke anywhere forms and message boxes

The other issue you'll know with ModalWindow's in wicket is that you have to declare the correct HTML components in any component (or parent component) from which you might launch a ModalWindow. This can get pretty mechanical and boring (developers hate mechanical and boring!) especially when your app can pop up a MessageBox or a reusable modal form from many different places/components. Typically you would assign each their own wicket:id and have a corresponding name in your ModalWindow class.

 ModalX for Wicket
 Previous: Download  Next: The Solutions