Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Won't Fix
-
Sling Models Implementation 1.1.0
-
None
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
- is related to
-
SLING-4734 Sightly should try to instantiate Sling Models first via SlingHttpServletRequest then via Resource and not the other way around
- Closed