Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-4083

Sling Models: Enable SlingObject injector to inject all context objects when a request is attached to the current thread

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • Sling Models Implementation 1.1.0
    • None
    • Extensions

    Description

      The SlingObjectInjector should support injecting all context objects (Resource, ResourceResolver, Request, Response, SlingScriptHelper) always, and not only when derivable from the current adaptable.

      in sling models 1.1.0 the injection of most of those objects fails e.g. when adapting from a resource resolver because the request object is not available. thus if a developer uses a @SlingObject annotation he has to be aware of those implementation details when the context objects are available and when not. if used from a scripting language light Sightly which first tries to adapt a model from the current resource, and after that from the current request things get worse.

      if a model is adapted in a thread initiated from a request all injections should be always supported.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            sseifert Stefan Seifert
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment