Messaging and Dynamic Widgets

jQXB allows a complete decoupling between the various part of a page.

Portions of UI can be loaded on-demand and interact with the parts already present on the page via messages.

In this example Dynamic Widgets are loaded directly from server on demand and they aren't typical hidden div. Under composite pattern point of view this page has the role of "Shell".

The shell loads Widgets. Once loaded any widget is already listening for messages.

In this example the Shell sends a "DISPLAYCUSTOMER" broadcast message together with the Customer object as additional parameter after loading a widget.

The same happens any time you select a different customer from the combo box.

Any loaded widget is notified and if it is involved with the message type ("topic"), it retrieves the Customer Object to display from message in order to do his job.

At any time a widget can ask the shell to be unloaded with an appropriate message ("UNLOADME").

Choose Customer: 
Load Customer Widget
Load Phones Widget
Load Montly Amount Widget