On 6/25/07 7:19 PM, "Mark Menard" <[EMAIL PROTECTED]> wrote:

> I have an action with a property of type BigDecimal, that is initialized, so
> it has a value:
> 
> Public class myAction {
>  BigDecimal myBigDecimal = new BigDecimal ("1.1");
> 
>  ...
> }
> 
> I have a form with the following:
> 
> <s:textfield name="myBigDecimal" />
> 
> The issue is if I blank out the value, myBigDecimal still retains the 1.1
> value in the action.

I overcame this behavior by writing my own type converter.
 
> Questions:
> 
> When a field is a java.lang.Number, and the input is blank, should "null" be
> set on the property?
> 
> Looking at ognl.OgnlOps.doubleValue() for a 0 length string it should be
> returning 0.0, why is it null?

This still leaves the question on what the default behavior ought to be. My
thought is the properties should be set to null.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to