Model Not Updated for Empty Fields

2011-12-05 Thread Richard W. Adams
For some  reason my data model is not being updated when I completely 
erase an input text field.

 I'm submitting the form via an AjaxSubmitLink, and the model shows 
changes to the contents when there ARE contents. And the model correctly 
shows changes to the field contents when I change the contents. But if 
completely ERASE the field content, the model does NOT show an empty 
string. Instead it shows the value before the erasure. The problem occurs 
regardless TextField.setConvertEmptyInputStringToNull is set to true or 
false.



**

This email and any attachments may contain information that is confidential 
and/or privileged for the sole use of the intended recipient.  Any use, review, 
disclosure, copying, distribution or reliance by others, and any forwarding of 
this email or its contents, without the express permission of the sender is 
strictly prohibited by law.  If you are not the intended recipient, please 
contact the sender immediately, delete the e-mail and destroy all copies.
**


Re: Model Not Updated for Empty Fields

2011-12-05 Thread Jeremy Thomerson
On Mon, Dec 5, 2011 at 4:31 PM, Richard W. Adams rwada...@up.com wrote:

 For some  reason my data model is not being updated when I completely
 erase an input text field.

  I'm submitting the form via an AjaxSubmitLink, and the model shows
 changes to the contents when there ARE contents. And the model correctly
 shows changes to the field contents when I change the contents. But if
 completely ERASE the field content, the model does NOT show an empty
 string. Instead it shows the value before the erasure. The problem occurs
 regardless TextField.setConvertEmptyInputStringToNull is set to true or
 false.


Is that field required?  If you've called setRequired(true) it will not
blank it out because that's a validation error.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*