commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <ahardy.str...@cyberspaceroad.com>
Subject Re: BeanUtils.populate with non-lowercase property names.
Date Wed, 25 Mar 2009 12:13:07 GMT
Jason Cipriani on 25/03/09 04:10, wrote:
> When using BeanUtils.populate() to populate a bean from
> HttpServletRequest.getParameterMap(), is there a way to make it
> recognize parameters with capital letters in their names, e.g. in the
> query string "?SomeName=value&AnotherName=value"?
> 
> I've tried making a bean with both setSomename/getSomename and
> setSomeName/getSomeName, but neither of those worked, and the property
> was not set. What would the name of the setters/getters in the bean
> have to be?

if BeanUtils relies on PropertyDescriptors

http://java.sun.com/javase/6/docs/api/java/beans/PropertyDescriptor.html

then it's not going to work since it doesn't adhere to the JavaBean standard. If 
you're willing to spend the time, you can force it by writing BeanInfo classes.

Regards
Adam

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


Mime
View raw message