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.internal.services
Class CompositeFieldValidator

    java.lang.Object
      org.apache.tapestry5.internal.services.CompositeFieldValidator

All Implemented Interfaces:
  FieldValidator

    public final class CompositeFieldValidator

extends java.lang.Object
implements FieldValidator

Aggregates together a number of field validator instances as a single unit.

Constructor Summary
`CompositeFieldValidator(java.util.List<FieldValidator> validators)`

Method Summary
`boolean` | `isRequired()` Returns true if any underlying `Validator` returns true from `Validator.isRequired()`.
`void` | `render(MarkupWriter writer)` Invokes `Validator.render(Field, Object, org.apache.tapestry5.ioc.MessageFormatter, MarkupWriter, org.apache.tapestry5.services.FormSupport)`.
`void` | `validate(java.lang.Object value)` Invoked after the client-submitted value has been `translated` to check that the value conforms to expectations (often, in terms of minimum or maximum value).

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

Constructor Detail

### CompositeFieldValidator

    public CompositeFieldValidator(java.util.List<FieldValidator> validators)

Method Detail

### validate

    public void validate(java.lang.Object value)
                  throws ValidationException

  Description copied from interface: `FieldValidator`
  Invoked after the client-submitted value has been `translated` to check that the value conforms to expectations (often, in terms of minimum or maximum value). If and only if the value is approved by all Validators is the value applied by the field.

  Specified by:
    `validate` in interface `FieldValidator`
  Parameters:
    `value` - the translated value supplied by the user
  Throws:
    `ValidationException` - if the value violates the constraint

### render

    public void render(MarkupWriter writer)

  Description copied from interface: `FieldValidator`
  Invokes `Validator.render(Field, Object, org.apache.tapestry5.ioc.MessageFormatter, MarkupWriter, org.apache.tapestry5.services.FormSupport)`. This is called at a point "inside" the tag, so that additional attributes may be added. In many cases, the underlying `Validator` may write client-side JavaScript to enforce the constraint as well.

  Specified by:
    `render` in interface `FieldValidator`
  Parameters:
    `writer` - markup writer to direct output to.
  See Also:
    `MarkupWriter.attributes(Object[])`

### isRequired

    public boolean isRequired()

  Description copied from interface: `FieldValidator`
  Returns true if any underlying `Validator` returns true from `Validator.isRequired()`.

  Specified by:
    `isRequired` in interface `FieldValidator`
  Returns:
    true if the field is required (a non-blank value is expected)

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.