This week's book giveaway is in the Java in General forum. We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line! See this thread for details.
I've got a form where I'm trying to load the parameterMap into a business object automatically using the BeanUtils class.
I can get everything to work but two form fields which are checkboxes w/ a value="true". It should load two setters in my class called "setIsAtLunch(boolean arg)" and "setIsInOffice(boolean arg)"...but it skips these two, presumably because they are booleans and somehow it isn't translating in the BeanUtils.populate() method.
I've named the form fields "isAtLunch" and "isInOffice" respectively so according to the JavaBeans spec, it should capture them just fine.
If I pull them out and wrap them w/ Boolean.parseBoolean() they work just fine...but I *really* would rather use BeanUtils - and I wouldn't imagine that it couldn't handle any form field type.