Platinum Partner
java

Metawidget: Display Screens, Facelets, and Improved Pluggability

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.

    Reference:
    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.

    Reference:
    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.

    Reference:
    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.

{{ tag }}, {{tag}},

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

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}