Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-188

Document the need to use @Inject with @Value or @Symbol when the parameter/field type is String (to avoid injecting the service id)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 5.0.15
    • 5.0.16
    • None
    • None

    Description

      At the bottom of http://tapestry.apache.org/tapestry5/tapestry-ioc/cookbook/servconf.html (Mapped Configurations), you mention:

      Tapestry IoC's symbols mechanism allows configuration values to be defined and perhaps overridden, then provided to services via injection, using the Value annotation.

      I think it would be more clear if you added that you may also need to use the Inject annotation, and maybe if you provided a simple example, like:

      public class Start
      {
      @Inject
      @Value("${tapestry.supported-locales}")
      private String _supportedLocales;

      public String getSupportedLocales()

      { return _supportedLocales; }

      }

      Attachments

        Activity

          People

            hlship Howard Lewis Ship
            pbeshai Peter Beshai
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: