You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/06/30 18:31:09 UTC
[jira] [Commented] (SLING-4734) Sightly should try to instanciate
Sling Models first via SlingHttpServletRequest then via Resource and not
the other way round
[ https://issues.apache.org/jira/browse/SLING-4734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14608620#comment-14608620 ]
ASF GitHub Bot commented on SLING-4734:
---------------------------------------
GitHub user lykorian opened a pull request:
https://github.com/apache/sling/pull/98
SLING-4734 - Sightly should try to instanciate Sling Models first via…
Updated `JavaUseProvider` to check Sling request for adaptability before current resource.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/lykorian/sling feature-sightly-adaptto-request-first
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/sling/pull/98.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #98
----
commit a3af3536c8b558bd82fe5730a968a3d4eb185dbd
Author: Mark Daugherty <ma...@gmail.com>
Date: 2015-06-30T16:28:17Z
SLING-4734 - Sightly should try to instanciate Sling Models first via SlingHttpServletRequest then via Resource and not the other way round.
----
> Sightly should try to instanciate Sling Models first via SlingHttpServletRequest then via Resource and not the other way round
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: SLING-4734
> URL: https://issues.apache.org/jira/browse/SLING-4734
> Project: Sling
> Issue Type: Improvement
> Components: Scripting
> Affects Versions: Scripting Sightly Engine 1.0.4, Scripting Sightly Models Use Provider 1.0.0
> Reporter: Konrad Windszus
>
> Currently the {{JavaUseProvider}} first tries to instantiate Sling Models via the {{Resource}} then via the {{SlingHttpServletRequest}}. I would argue that the inverse order makes more sense, because more injections are supported via the {{SlingHttpServletRequest}} for Sling Models.
> This would only matter though, where the same class would be adaptable from both {{Resource}} and {{SlingHttpServletRequest}}. In that case though the instantiation via the {{SlingHttpServletRequest}} would support more injections (e.g. the SlingObjectInjector supports much more with the {{SlingHttpServletRequest}}, compare with SLING-4083)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)