Typical (string) length
The typicalLength() element indicates the typical length of a string parameter. It is ignored for parameters of other types.
The information is intended as a hint to the UI to determine the space that should be given to render a particular string parameter.
For example:
public class Customer {
public Customer updateName(
@Parameter(maxLength=30)
@ParameterLayout(
typicalLength=20
)
final String firstName,
@Parameter(maxLength=30)
@ParameterLayout(
typicalLength=20
)
final String lastName) {
// ...
}
// ...
}
| All that said, the Web UI (Wicket viewer) uses the maximum space available for all fields, so in effect ignores this element. |