Package org.apache.tapestry5.internal.services

## Class FieldTranslatorSourceImpl

- java.lang.Object
- - org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl

- All Implemented Interfaces:
    `FieldTranslatorSource`

      public class FieldTranslatorSourceImpl
      extends Object
      implements FieldTranslatorSource

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `FieldTranslatorSourceImpl​(TranslatorSource translatorSource, Messages globalMessages, FormSupport formSupport)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `FieldTranslator` | `createDefaultTranslator​(ComponentResources resources, String parameterName)` | Common shorthand for `FieldTranslatorSource.createDefaultTranslator(org.apache.tapestry5.Field, String, org.apache.tapestry5.commons.Messages, java.util.Locale, Class, org.apache.tapestry5.commons.AnnotationProvider)`.
    `FieldTranslator` | `createDefaultTranslator​(Field field, String overrideId, Messages overrideMessages, Locale locale, Class propertyType, AnnotationProvider propertyAnnotations)` | Creates a `FieldTranslator` for the given property, or returns null if one can't be constructed.
    `FieldTranslator` | `createTranslator​(ComponentResources resources, String translatorName)` | Creates a translator (used by the `translate: binding prefix`).
    `FieldTranslator` | `createTranslator​(Field field, String overrideId, Messages overrideMessages, Locale locale, Translator translator)` | Wraps a `Translator` as a FieldTranslator.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FieldTranslatorSourceImpl

          public FieldTranslatorSourceImpl​(TranslatorSource translatorSource,
                                           Messages globalMessages,
                                           FormSupport formSupport)

  - ### Method Detail

    - #### createDefaultTranslator

          public FieldTranslator createDefaultTranslator​(ComponentResources resources,
                                                         String parameterName)

      Description copied from interface: `FieldTranslatorSource`
      Common shorthand for `FieldTranslatorSource.createDefaultTranslator(org.apache.tapestry5.Field, String, org.apache.tapestry5.commons.Messages, java.util.Locale, Class, org.apache.tapestry5.commons.AnnotationProvider)`.
      Specified by:
        `createDefaultTranslator` in interface `FieldTranslatorSource`
      Parameters:
        `resources` - of component who owns the parameter
        `parameterName` - name of parameter used to determine the property type
      Returns:
        field translator, or null

    - #### createDefaultTranslator

          public FieldTranslator createDefaultTranslator​(Field field,
                                                         String overrideId,
                                                         Messages overrideMessages,
                                                         Locale locale,
                                                         Class propertyType,
                                                         AnnotationProvider propertyAnnotations)

      Description copied from interface: `FieldTranslatorSource`
      Creates a `FieldTranslator` for the given property, or returns null if one can't be constructed. The return value is null if the property type is not known, or if there is no `Translator` available from the `TranslatorSource` that is appropriate for the property type.
      Specified by:
        `createDefaultTranslator` in interface `FieldTranslatorSource`
      Parameters:
        `field` - for which a translator is needed
        `overrideId` - id used when looking in the overrideMessages for a message override
        `overrideMessages` - location to look for overriding messages
        `locale` - no longer used in 5.3, may be null
        `propertyType` - type of property editted by the field, used to select the Translator
        `propertyAnnotations` - annotations on the property (not currently used)
      Returns:
        the field translator, or null

    - #### createTranslator

          public FieldTranslator createTranslator​(Field field,
                                                  String overrideId,
                                                  Messages overrideMessages,
                                                  Locale locale,
                                                  Translator translator)

      Description copied from interface: `FieldTranslatorSource`
      Wraps a `Translator` as a FieldTranslator.
      Specified by:
        `createTranslator` in interface `FieldTranslatorSource`
        `locale` - no longer used in 5.3, may be null

    - #### createTranslator

          public FieldTranslator createTranslator​(ComponentResources resources,
                                                  String translatorName)

      Description copied from interface: `FieldTranslatorSource`
      Creates a translator (used by the `translate: binding prefix`).
      Specified by:
        `createTranslator` in interface `FieldTranslatorSource`