public abstract class TextField extends org.apache.tapestry.form.TextField
{
public void updateValue(String value)
{
getValueBinding().setString(((value != null) && (value.length() > 0)) ? value : null);
}
}
Paul
Dan wrote:
Hello,
In Tapestry 3.0.x submission of empty text field will initialize property binded to this field with empty string (sometimes called a blank string). Is there any chance to set this property to null instead ?
e.g. I have an Contact bean with optional property let's say lastName. I would like to have this property null if user left this field blank.
How can I achieve this (in whole app of course)?
Regards Dan
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
