EasyView for JSF

Mogwai EasyView is a component library for Java Server Faces(JSF). It provides a generic mechanism to create complex user interfaces in a minimum amount of time. At the moment, only Facelets is supported as the View presentation layer.

Basically, a user interface is described using an expression. An expression is a list of properties combined with layout instructions. For every property, a label and an input component is generated. The label internationalisation is done using a provided ResourceBundle.


property1,property2,property3 This example will layout the three properties in a row. So comma means "put the sequence of properties in a row".


property1;property2;property3 This example will layout the three properties in three rows and one column. So it means "put the sequence of properties in a column".


group1 [property1,property2,property3] This example will generate a group, and put the three properties inside the group in one row. So the [] indicates a group. The text before of the [ character is the caption of the group.


{tab1 [property1, property2],tab2 [property3]} This example will generate a tabsheet, with two tabs. Here the grouping operator is used to define a tab.


The installation is quite simple. Just place the EasyView .jar file in the WEB-INF/lib directory of your JSF application. Mogwai EasyView supports JBoss Richfaces and Apache MyFaces Tomahawk as the underlying component library. The configuration is done using a context parameter defined in web.xml the following way:






<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:m="http://mogwai.sourceforge.net/easyview" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core">
<meta http-equiv="keywords" content="enter,your,keywords,here" />
<meta http-equiv="description" content="A short description of this page." />
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<f:loadBundle var="bundle" basename="test"/>

<m:genericUI msg="#{bundle}" value="#{backingBean}"
uiExpression="exampleform [name1,name2;{tab1[name3,date,checkbox],tab2[text1;text2;text3]}]">
<m:property name="date" type="datepicker"/>
<m:property name="checkbox" type="checkbox"/>



The component generation can be fine tuned using the m:property component. Here, a property is assigned to a stereotype. The stereotype defines the visual presentation of the property, e.g. a datepicker, a Checkbox or just an input field. The following stereotypes are supported:

  • text
  • password
  • textarea
  • checkbox
  • datepicker

Download latest release at SourceForge


Project Homepage:

SourceForge.net Logo

Support This Project
Validate XHTML & CSS