public interface FormComponentContributorContext extends ValidationMessages
FormComponentContributor
. For the moment, at least, this is all
about client-side JavaScript generation.
TODO: Having support for regular expressions might be useful (and would allow a single {@link RegexpMatcher to be shared).
Modifier and Type | Method and Description |
---|---|
void |
addSubmitHandler(java.lang.String handler)
Adds initialization to register a submit handler on the client side.
|
void |
includeClasspathScript(java.lang.String path)
Includes the indicated script; the path is a path on the classpath.
|
void |
registerForFocus(int priority)
Registers a field for automatic focus.
|
formatValidationMessage, getLocale
void includeClasspathScript(java.lang.String path)
void addSubmitHandler(java.lang.String handler)
submitListener
- either the name of a submit listener ("myListener"), or an inline implementation
of a listener function ("function(event) { ... } ").void registerForFocus(int priority)
priority
- a priority level used to determine whether the registered field becomes the focus
field. Constants for this purpose are defined in ValidationConstants
.FormBehavior.registerForFocus(IFormComponent, int)