commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pantichd <panti...@firstenergycorp.com>
Subject Confused about BeanUtils.describe
Date Thu, 25 May 2006 21:34:54 GMT

Hello,

I have a need to get a map of all the properties and values of an object.
The BeanUtils.describe method seems perfect for that.

However, when I debug the following simple servlet code I get nothing in the
"newparms" field after setting it to the result of the BeanUtils.describe
method call. I'm probably missing something REALLY stupid but I just can't
figure it out.

Any help would be appreciated.

Sample servlet code...
 TestObject user = new TestObject();
 user.setName("John Doe");
 user.setAge(32);
 try {
  Map newparms = BeanUtils.describe(user);
  ...
} catch (IllegalAccessException e) {
  e.printStackTrace();
} catch (InvocationTargetException e) {
 e.printStackTrace();
} catch (NoSuchMethodException e1) {
 e1.printStackTrace();
}


Thanks 

David
--
View this message in context: http://www.nabble.com/Confused+about+BeanUtils.describe-t1683572.html#a4566664
Sent from the Commons - User forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message