|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FormSupport
Services provided by an enclosing Form control component to the various form element components it encloses.
Implements ClientElement
, to share the id of the enclosing form.
Field
Method Summary | ||
---|---|---|
void |
addValidation(Field field,
java.lang.String validationName,
java.lang.String message,
java.lang.Object constraint)
Collects field validation information. |
|
java.lang.String |
allocateControlName(java.lang.String id)
Allocates a unique (within the form) control name for some enclosed component, based on the component's id. |
|
void |
defer(java.lang.Runnable command)
Defers a command until the end of the form submission. |
|
java.lang.String |
getFormComponentId()
Returns the complete id of the underlying Form component. |
|
java.lang.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(java.lang.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 store(Object, org.apache.tapestry5.ComponentAction) }, but the action is also invoked
immediately. |
Methods inherited from interface org.apache.tapestry5.ClientElement |
---|
getClientId |
Method Detail |
---|
java.lang.String allocateControlName(java.lang.String id)
id
- the component's id
<T> void store(T component, ComponentAction<T> action)
<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(java.lang.Runnable command)
command
- to be executedvoid setEncodingType(java.lang.String encodingType)
encodingType
- MIME type indicating type of encoding for the form
java.lang.IllegalStateException
- if the encoding type has already been set to a value different than the suppliedvoid addValidation(Field field, java.lang.String validationName, java.lang.String message, java.lang.Object constraint)
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()
java.lang.String getFormComponentId()
FormInjector
.
java.lang.String getFormValidationId()
Messages
for validation messages and
constraints. This is normally the simple id of the form.
FieldTranslatorSource
,
FieldValidatorSource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |