Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tapestry5.kaptcha.components
Class KaptchaField

    java.lang.Object
      org.apache.tapestry5.corelib.base.AbstractField
          org.apache.tapestry5.kaptcha.components.KaptchaField

All Implemented Interfaces:
  ClientElement, Field

    @SupportsInformalParameters
    @Import(stylesheet="kaptcha.css")
    public class KaptchaField

extends AbstractField

Field paired with a `KaptchaImage` to ensure that the user has provided the correct value.

Since:
  5.3

Component Parameters
Name | Description | Type | Flags | Default | Default Prefix | Since
--- | --- | --- | --- | --- | --- | ---
clientId | The id used to generate a page-unique client-side identifier for the component. If a component renders multiple times, a suffix will be appended to the to id to ensure uniqueness. The uniqued value may be accessed via the clientId property. | String |  | prop:componentResources.id | literal |
disabled | If true, then the field will render out with a disabled attribute (to turn off client-side behavior). When the form is submitted, the bound value is evaluated again and, if true, the field's value is ignored (not even validated) and the component's events are not fired. | boolean |  | false | prop |
image | The image output for this field. The image will display a distorted text string. The user must decode the distorted text and enter the same value. | org.apache.tapestry5.kaptcha.components.KaptchaImage | Required |  | component |
label | The user presentable label for the field. If not provided, a reasonable label is generated from the component's id, first by looking for a message key named "id-label" (substituting the component's actual id), then by converting the actual id to a presentable string (for example, "userId" to "User Id"). | String |  |  | literal |
visible | Controls whether the field is rendered like a password field (false, the factory default) or like a normal text field (true). | boolean |  | symbol:tapestry.kaptcha-default-visible | prop | 5.3

Constructor Summary
`KaptchaField()`

Method Summary
`boolean` | `isRequired()` Always required.
`protected void` | `processSubmission(java.lang.String controlName)` Method implemented by subclasses to actually do the work of processing the submission of the form.

Methods inherited from class org.apache.tapestry5.corelib.base.AbstractField
`decorateInsideField, getClientId, getControlName, getLabel, isDisabled, putPropertyNameIntoBeanValidationContext, removePropertyNameFromBeanValidationContext, setDecorator, setFormSupport`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### KaptchaField

    public KaptchaField()

Method Detail

### isRequired

    public boolean isRequired()

  Always required.

  Specified by:
    `isRequired` in interface `Field`
  Overrides:
    `isRequired` in class `AbstractField`
  Returns:
    true if a non-blank value is required for the field

### processSubmission

    protected void processSubmission(java.lang.String controlName)

  Description copied from class: `AbstractField`
  Method implemented by subclasses to actually do the work of processing the submission of the form. The element's controlName property will already have been set. This method is only invoked if the field is not `disabled`.

  Specified by:
    `processSubmission` in class `AbstractField`
  Parameters:
    `controlName` - the control name of the rendered element (used to find the correct parameter in the request)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2012 The Apache Software Foundation.