DynaForms: Forms Without Java

DynaForms are an extension of the Apache Commons Beanutils project. As part of the org.apache.commons.beanutils package, an interface called DynaBean was created. Unlike normal JavaBeans, which require explicit getXXX() and setXXX() methods to be written for each property, a DynaBean uses a generic get() and set() method with the property name as the first argument.

A fuller description of the DynaBean package can be found on the Jakarta Web site at http://jakarta.apache.org/commons/beanutils.html.

For example, in a traditional JavaBean, you would say

myBean.setType("kidneybean");

Using DynaBeans, you would say

myBean.set("type", "kidneybean");

This approach has both advantages and disadvantages. The major ...

Get Struts Kick Start now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.