Developing and maintaining dynamic views is challenging, since there are often aspects of both the content and the layout that are common across multiple views. When content and layout are interwined, it is harder to maintain and extend the views. Reuse and modularity also suffer when common code is duplicated across views.

Calyxo Panels realize the Composite View design pattern to enable management of views in a flexible and maintainable way.

The Calyxo Panels component enables the definition of views in a container/component manner. Pages are dynamically composed from a tree of page fragments. Panel definitions are centralized in an XML configuration file.


As a major plus, Calyxo Panels bring the benefits of object oriented programming into the view layer. Since your page fragments are reusable units, there's no need for code duplication.

We'll refer to page fragments as templates.

A panel defines how to bundle templates into a concrete view. Panel definitions themselves may use inheritance by extending other panel definitions, which is also of great use.


Beyond linking to templates, panel definitions may specify parameters and lists, which are made available to templates through custom tags (and Calyxo accessors).

Yet flexible, the Calyxo Panels component is impressively small. The configuration introduces just four elements (including the root element). The tag library contains three tags and there's one accessor. This condensed design helps to make the component very easy to understand and use.

Maintainability and Consistency

With Calyxo Panels, view maintenance is greatly simplified. Adding a new view requires just adding a panel definition and providing the template(s) containing content unique to that view.

Avoiding duplication of content by reuse leads to a high level of consistency. Keeping a consistent layout is made much easier.


You may use Calyxo Panels with Calyxo Control or with Struts. The information provided on the following pages apply to either environment.