|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry5.corelib.internal.FormSupportAdapter
public class FormSupportAdapter
An implementation of FormSupport
that delegates all behavior to another
instance of FormSupport. This allows some of the behavior to be overridden easily.
Constructor Summary | |
---|---|
FormSupportAdapter(FormSupport delegate)
|
Method Summary | ||
---|---|---|
void |
addValidation(Field field,
String validationName,
String message,
Object constraint)
Collects field validation information. |
|
String |
allocateControlName(String id)
Allocates a unique (within the form) control name for some enclosed component, based on the component's id. |
|
void |
defer(Runnable command)
Defers a command until the end of the form submission. |
|
String |
getClientId()
Returns a unique id for the element. |
|
String |
getFormComponentId()
Returns the complete id of the underlying Form component. |
|
String |
getFormValidationId()
Id used as a prefix when searching Messages for validation messages and
constraints. |
|
boolean |
isClientValidationEnabled()
Return true if client validation is enabled for this form, false otherwise. |
|
void |
setEncodingType(String encodingType)
Sets the encoding type for the Form. |
|
|
store(T component,
ComponentAction<T> action)
Stores an action for execution during a later request. |
|
|
storeAndExecute(T component,
ComponentAction<T> action)
As with FormSupport.store(Object, org.apache.tapestry5.ComponentAction) }, but the action is also invoked
immediately. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FormSupportAdapter(FormSupport delegate)
Method Detail |
---|
public String allocateControlName(String id)
FormSupport
allocateControlName
in interface FormSupport
id
- the component's id
public <T> void store(T component, ComponentAction<T> action)
FormSupport
store
in interface FormSupport
public <T> void storeAndExecute(T component, ComponentAction<T> action)
FormSupport
FormSupport.store(Object, org.apache.tapestry5.ComponentAction)
}, but the action is also invoked
immediately. This is useful for defining an action that should occur symmetrically in both the render request and
the form submission's action request.
storeAndExecute
in interface FormSupport
component
- component against which to trigger the actionaction
- the action that will be triggered (and passed the component)public void defer(Runnable command)
FormSupport
defer
in interface FormSupport
command
- to be executedpublic void setEncodingType(String encodingType)
FormSupport
setEncodingType
in interface FormSupport
encodingType
- MIME type indicating type of encoding for the formpublic void addValidation(Field field, String validationName, String message, Object constraint)
FormSupport
addValidation
in interface FormSupport
field
- for which validation is being generatedvalidationName
- name of validation method (see Tapestry.Validation in tapestry.js)message
- the error message to display if the field is invalidconstraint
- additional constraint value, or null for validations that don't require a constraintpublic String getClientId()
ClientElement
getClientId
in interface ClientElement
public boolean isClientValidationEnabled()
FormSupport
isClientValidationEnabled
in interface FormSupport
public String getFormComponentId()
FormSupport
FormInjector
.
getFormComponentId
in interface FormSupport
public String getFormValidationId()
FormSupport
Messages
for validation messages and
constraints. This is normally the simple id of the form.
getFormValidationId
in interface FormSupport
FieldTranslatorSource
,
FieldValidatorSource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |