Can we use BigDecimal attributes in actionForm and get the user inputs for that from a
JSP.
I tried it and am getting IllegalArgumentException
<<
[10/8/06 14:26:42:000 CDT] 6fb22775 WebGroup E SRVE0026E: [
Servlet Error]-[BeanUtils.populate]: java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>
The JSP looks like this..
Test BigDecimal<html:text property="testBigDecimal"></html:text>
The actionForm looks like this
public class MyForm extends ActionForm {
BigDecimal testBigDecimal = null;
/**
* @return
*/
public BigDecimal getTestBigDecimal() {
return testBigDecimal;
}
/**
* @param decimal
*/
public void setTestBigDecimal(BigDecimal dec) {
testBigDecimal = dec;
}
}
Am I missing something. My lead wants all dollar values in our business objects to be a BigDecimal, that is why I am using BigDecimal instead of the primitives.
Please advice if it is a NO-NO to use objects attributes in JSP's. Is there any alternative for using them ??
Regards,
Ram