|
||||||||||
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,
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 |
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 store(Object, org.apache.tapestry5.ComponentAction) }, but the action is also invoked
immediately. |
Methods inherited from interface org.apache.tapestry5.ClientElement |
---|
getClientId |
Method Detail |
---|
String allocateControlName(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(Runnable command)
command
- to be executedvoid setEncodingType(String encodingType)
encodingType
- MIME type indicating type of encoding for the form
IllegalStateException
- if the encoding type has already been set to a value different than the suppliedvoid addValidation(Field field, String validationName, String message, 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()
String getFormComponentId()
FormInjector
.
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 |