JSF will not permit the entry of invalid data. That's one of its core concepts. And there is no number that corresponds to "".
If you use the Integer data type instead of "int", then setting it to null might work, but I won't guarantee it. I don't know what the spec says is supposed to happen and I'm too lazy to RTFM.
The only way I can guarantee that an empty value will be accepted is if you define the property as a String. However you would then need a validator to prevent non-numeric data from being set in the backing bean.
An IDE is no substitute for an Intelligent Developer.
Joined: Jan 08, 2013
Thanks very much, I have change the type to Integer and it works as what I want