Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-1731

@Inject @Symbol does not work inside a component

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.0.5
    • 5.0.6
    • tapestry-core
    • None

    Description

      This should work:

      @Inject
      @Symbol(WebConstants.DOCUMENT_ROOT_DIR)
      private String _documentRoot;

      But the @Symbol is not recognized, so the injection is implemented as:

      add method: private void _$write_documentRoot(java.lang.String $1)
      throw new java.lang.RuntimeException("Field com.dtsoft.ws.web.pages.CreateOrder._documentRoot is read-only.");

      add constructor: com.dtsoft.ws.web.pages.CreateOrder(org.apache.tapestry.internal.InternalComponentResources $1, com.dtsoft.ws.web.services.OrderDatabase $2)

      { _$resources = $1; _documentRoot = _$resources.getCompleteId(); _database = $2; initializer(); }

      This appears to be the same for @Inject @Value ... with a String type, the only thing that can be injected is the component id.

      Attachments

        Activity

          People

            hlship Howard Lewis Ship
            hlship Howard Lewis Ship
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: