@SupportsInformalParameters public abstract class AbstractField extends Object implements Field
RenderInformals
,
RenderDisabled
and DiscardBody
mixins.Constructor and Description |
---|
AbstractField() |
Modifier and Type | Method and Description |
---|---|
protected void |
decorateInsideField()
Invoked from subclasses after they have written their tag and (where appropriate) their informal parameters
and have allowed their
Validator to write markup as well. |
String |
getClientId()
Returns a unique id for the element.
|
String |
getControlName()
Returns the value used as the name attribute of the rendered element.
|
String |
getLabel()
Returns a user presentable (localized) label for the field, which may be used inside <label> elements on
the client, and inside client or server-side validation error messages.
|
boolean |
isDisabled()
Returns true if the field is disabled; A disabled field will render a disabled attribute so that it is
non-responsive on the client (at least, until its disabled status is changed on the client using JavaScript).
|
boolean |
isRequired()
Returns false; most components do not support declarative validation.
|
protected abstract void |
processSubmission(String controlName)
Method implemented by subclasses to actually do the work of processing the submission of the form.
|
protected void |
putPropertyNameIntoBeanValidationContext(String parameterName) |
protected void |
removePropertyNameFromBeanValidationContext() |
protected void |
setDecorator(ValidationDecorator decorator) |
protected void |
setFormSupport(FormSupport formSupport) |
public AbstractField()
public final String getLabel()
Field
public final String getClientId()
ClientElement
getClientId
in interface ClientElement
public final String getControlName()
Field
getControlName
in interface Field
FormSupport.allocateControlName(String)
public final boolean isDisabled()
Field
isDisabled
in interface Field
protected abstract void processSubmission(String controlName)
disabled
.controlName
- the control name of the rendered element (used to find the correct parameter in the request)protected final void decorateInsideField()
Validator
to write markup as well.protected final void setDecorator(ValidationDecorator decorator)
protected final void setFormSupport(FormSupport formSupport)
public boolean isRequired()
isRequired
in interface Field
protected void putPropertyNameIntoBeanValidationContext(String parameterName)
protected void removePropertyNameFromBeanValidationContext()
Copyright © 2003-2012 The Apache Software Foundation.