public interface FormSupport extends ClientElement
ClientElement, to share the id of the enclosing form.Field| Modifier and Type | Method and Description |
|---|---|
void |
addValidation(Field field,
String validationName,
String message,
Object constraint)
Deprecated.
Deprecated in 5.4 with no exact replacement; this default implementation now does nothing.
Invoke
isClientValidationEnabled(), and (if true),
use JavaScriptSupport to add necessary modules, and add
triggering and configuring attributes to the field's Element. |
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 |
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.
|
<T> void |
store(T component,
ComponentAction<T> action)
Stores an action for execution during a later request.
|
<T> void |
storeAndExecute(T component,
ComponentAction<T> action)
As with
store(Object, org.apache.tapestry5.ComponentAction)}, but the action is also invoked
immediately. |
<T> void |
storeCancel(T component,
ComponentAction<T> action)
Stores an action for execution in a later request when the containing form is canceled.
|
getClientIdString allocateControlName(String id)
id - the component's id<T> void store(T component, ComponentAction<T> action)
<T> void storeCancel(T component, ComponentAction<T> action)
EventConstants.CANCELED event.<T> void storeAndExecute(T component, ComponentAction<T> action)
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.component - component against which to trigger the actionaction - the action that will be triggered (and passed the component)void defer(Runnable command)
command - to be executedvoid setEncodingType(String encodingType)
encodingType - MIME type indicating type of encoding for the formIllegalStateException - if the encoding type has already been set to a value different than the suppliedvoid addValidation(Field field, String validationName, String message, Object constraint)
isClientValidationEnabled(), and (if true),
use JavaScriptSupport to add necessary modules, and add
triggering and configuring attributes to the field's Element.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 constraintboolean isClientValidationEnabled()
String getFormComponentId()
String getFormValidationId()
Messages for validation messages and
constraints. This is normally the simple id of the form.FieldTranslatorSource,
FieldValidatorSource5.6.4 - Copyright © 2003-2021 The Apache Software Foundation.