If you are correctly updating the form value via JavaScript, and that form value is being submitted as an empty
string, and the form bean doesn't do anything other than take the form value, then it will work. So one of those steps is likely not doing what you think it is.