|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry5.corelib.base.AbstractField
@SupportsInformalParameters public abstract class AbstractField
Provides initialization of the clientId and elementName properties. In addition, adds the RenderInformals
,
RenderDisabled
and DiscardBody
mixins.
Constructor Summary | |
---|---|
AbstractField()
|
Method Summary | |
---|---|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractField()
Method Detail |
---|
public final String getLabel()
Field
getLabel
in interface Field
Label
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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |