public class PasswordField extends AbstractTextField
TextField
, but rendered out as an <input type="password"> element. Further, the output
value for a PasswordField is always blank. When the value provided to the PasswordField is blank, it does not update
its property (care should be taken that the "required" validator not be used in that case).
Includes the size
attribute, if a Width
annotation is present on
the property bound to the value parameter.Name | Type | Flags | Default | Default Prefix |
---|---|---|---|---|
annotationProvider | org. | prop | ||
Provider of annotations used for some defaults. Annotation are usually provided in terms of the value parameter (i.e., from the getter and/or setter bound to the value parameter). | ||||
nulls | org. | default | nullfieldstrategy | |
Defines how nulls on the server side, or sent from the client side, are treated. The selected strategy may replace the nulls with some other value. The default strategy leaves nulls alone. Another built-in strategy, zero, replaces nulls with the value 0. | ||||
translate | org. | Required, Not Null | translate | |
The object which will perform translation between server-side and client-side representations. If not specified, a value will usually be generated based on the type of the value parameter. | ||||
validate | org. | validate | ||
The object that will perform input validation (which occurs after translation). The validate binding prefix is generally used to provide this object in a declarative fashion. | ||||
value | Object | Required | prop | |
The value to be read and updated. This is not necessarily a string, a translator may be provided to convert between client side and server side representations. If not bound, a default binding is made to a property of the container matching the component's id. If no such property exists, then you will see a runtime exception due to the unbound value parameter. |
Name | Description |
---|---|
parseClient | |
toClient | |
validate |
clientId, cssClass, decorator, defaultProvider, disabled, environment, fieldValidationSupport, formSupport, javaScriptSupport, label, request, resources, validationTracker
Constructor and Description |
---|
PasswordField() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
ignoreBlankInput()
Returns true, blank input should be ignored and not cause an update to the server-side property bound to the
value parameter.
|
protected void |
writeFieldTag(MarkupWriter writer,
String value)
Invoked from
AbstractTextField.begin(MarkupWriter) to write out the element and attributes (typically, <input>). |
getWidth, isRequired, processSubmission
decorateInsideField, getClientId, getControlName, getLabel, isDisabled, putPropertyNameIntoBeanValidationContext, removePropertyNameFromBeanValidationContext, setDecorator, setFormSupport
public PasswordField()
protected final void writeFieldTag(MarkupWriter writer, String value)
AbstractTextField
AbstractTextField.begin(MarkupWriter)
to write out the element and attributes (typically, <input>). The
controlName and clientId
properties will already have been set or updated.
Generally, the subclass will invoke MarkupWriter.element(String, Object[])
, and will be responsible for
including an AfterRender
phase method to invoke MarkupWriter.end()
.writeFieldTag
in class AbstractTextField
writer
- markup write to send output tovalue
- the value (either obtained and translated from the value parameter, or obtained from the tracker)protected boolean ignoreBlankInput()
ignoreBlankInput
in class AbstractTextField
Copyright © 2003-2013 The Apache Software Foundation.