package org.apache.wicket.markup.html.form;
Abstract base class for TextArea and TextField.
Text components that implement this interface are know to be able to
provide a pattern for formatting output and parsing input. This can be
used by for instance date picker components which are based on Javascript
and need some knowledge as to how to communicate properly via request
parameters.
Gets the pattern for printing output and parsing input.
Should the bound object become
null when the input is
empty?
- Returns:
true when the value will be set to
null when the input is empty.
TextFields return an empty string even if the user didn't type anything
in them. To be able to work nicely with validation, this method returns
false.
If the type is not set try to guess it if the model supports it.
Should the bound object become
null when the input is
empty?
- Parameters:
flag
the value to set this flag.- Returns:
- this
String tmp = value != null && value.length > 0 ? value[0] : null;