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?
I can recommend you Metawidget.
you can also check spring Roo @ http://www.springsource.org/roo/start
You might want to check out this example of data binding using JGoodies.
精彩评论