Hello Knight,
I think you can change the Value-Object(Model obj), modify the get method
code:
if(this.value.equal("")){
this.value=null;
or
this.value=0
}
You can pass a Value-Object to server side, instead of Json-Text formation.
Regards,
Mead
On Mon, Nov 22, 2010 at 8:12 PM, Knight Chen <[email protected]> wrote:
> Hi all,
>
> I often encounter Number format exception when I use JSON plugin to
> parse input String "" from AJAX request to Number,
> because in Web front, that will be a zero length String "" transfer
> to backend if the text input has no enter,
> so will encounter the Number format exception for input String "".
>
> I check the JSONPopulator, that has process the null value to 0 when
> parse to Number type, but not process the String "",
> So can JSONPopulator to support process String "" to null or 0,that
> will be easier web front develop.
>
>
> --
> ========================
> Knight Chen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>