views:

77

answers:

2

Hi Guys;

I am writting an application that autogenerated the data input UI from a java bean.

Now i have a bean that has other beans as a property. eg User has property username, and usertype of type UserType;

Whats the best strategy in java. Do i loop through the fields in an if else loop? eg. get field list if field is of type text use text field else if field is a number user a number field etc.

is there a shortcut to the ifs?

A: 

You might want to check out this example of data binding using JGoodies.

Adamski
+1  A: 

you can also check spring Roo @ http://www.springsource.org/roo/start

Pangea