> It will not format some values unless I declare them as primitive values. > As soon as I change numTons on the release object it formats fine. >
Interesting. The <bean:write/> tag will use the PropertyUtils.getProperty() to the value for that property and then format it. The getProperty() of PropertyUtils returns a java.lang.Object and so even if the property is defined as a primitive the corresponding Object wrapper will be given back for formatting. The <bean:write/> will format unless the value from the getProperty() is resolved to a java.lang.String. So, I think it should behave the same if you use java.lang.Double or a primitive double. I would try from a test-case what the type of the object that is being returned from the call PropertyUtils.getProperty(inventoryStatusForm, "released.numTons"); when a java.lang.Double and a primitive double is used for numTons. And if they are different from java.lang.Double, there should be something which should be confusing PropertyUtils. Just curious. What version of beanutils and JDK do you use?