Wizard Generator with Annotation

I’m starting a pet project to generate Vaadin wizard style application based on annotation of domain classes. If you have heard of Naked Object project you probably have an idea what it is about.

My idea is a wizard is a kind of UI providing limited view to your domain object one step of a time.
Think of it like a window that can slide up and down across your domain class: if it scroll up you step backward, otherwise you advance to the next set of fields. Because the way Vaadin’s BeanItem and FormFieldFactory are such powerful and elegant concepts I come up with the idea of having a wizard window running up/down this domain (BeanItem) class.

The code will read annotations in your Pojo class and generate a wizard (step-by-step) UI suite.

So far I have done the following to get my prototype code running:

  • Apt-jelly is used to process annotation
  • Freemarker template engine is used as a plateholder for the generated source code
  • Vaadin’s custom layout (HTML based) is used to provide steps in the wizard

What I think interesting about this is:

  • The generated code is completely independent from the UI layout, style as well as its visibility
  • Declarative annotation for field’s validation, data acquisition

Areas for improvement:

  • hard coded Vaadin class name in the template
  • generated code does NOT hide any fields in the wizard. The visibility is done with the custom layout. This could be a performance issue. I need to figure out a way to allow annotation show/hide fields in each step as well.

You can check out the proof of concept at

Vaadin Wizard Pojo Annotation

Please let me know how it can be improved.