Over a million developers have joined DZone.

Metawidget: Display Screens, Facelets, and Improved Pluggability

DZone's Guide to

Metawidget: Display Screens, Facelets, and Improved Pluggability

· Java Zone
Free Resource

Learn how to troubleshoot and diagnose some of the most common performance issues in Java today. Brought to you in partnership with AppDynamics.

Metawidget, the library that lets you generate a user interface from your domain objects, has come out with a new release. In an interview here on JavaLobby some months ago, Richard Kennard, Metawidget's creator, outlined the basic aims of the project and walked us through an example. In summary, Metawidget takes your existing back-end domain objects and creates, at runtime, UI components native to your existing front-end framework, as illustrated below:

Although it is a minor release, and again pre-1.0, (in fact, v0.43), a number of significant enhancements have now been made available. The release focuses specifically on the following feature enhancements:

  • Read-only mode for displaying business objects.

    Metawidgets can now toggle a setReadOnly mode, so now Metawidget can not only automatically generate the UI for data entry screens but also data display screens too. This potentially doubles the number of places in an application where a chunk of boilerplate code can be replaced with a Metawidget call.

    Metawidget: now twice as useful!

  • Facelets support.

    The Java Server Faces (JSF) Metawidget now supports the popular Facelets framework. Coupled with the existing JBoss RichFaces support, this makes it easy to retrofit existing JBoss Seam applications to remove boilerplate code.

    Using Metawidget with Seam, Facelets, JPA and Hibernate Validator

  • Mixin to ease development of custom Metawidgets.

    Whilst all Metawidgets necessarily extend the base classes of their target framework (such as JComponent for Swing and UIComponent for JSF), the new MetawidgetMixin gives a boost to those looking to develop custom Metawidgets. It provides pre-built functionality such as deciding when to use single versus compound widgets, support for overriding widgets, incorporating stubs, and changing between read-only and active modes.

    Implementing Your Own Metawidget and Plugging into Metawidget.


When learning about Metawidget, the best place to start is the Reference Documentation (PDF).

Your feedback is invaluable to the Metawidget team, use the Forums on the Metawidget site for this purpose.

Understand the needs and benefits around implementing the right monitoring solution for a growing containerized market. Brought to you in partnership with AppDynamics.


Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}